nginx - 我无法为我的域获取证书
问题描述
我在 Ubuntu Focal 机器上安装 Peertube 服务器,因此遵循官方指南。
在配置网络服务器时,我必须根据需要为我的域生成证书,以使 https 工作,输入以下命令:
sudo certbot certonly --standalone --post-hook "systemctl restart nginx"
但是当我这样做时,会发生此错误:
Error output from post-hook command systemctl:
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
我想看看会发生什么,但我真的不明白(我还在学习,并且很难做到这一点)。systemctl status nginx.service
返回这个:
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2021-04-12 14:19:47 UTC; 9min ago
Docs: man:nginx(8)
Process: 16306 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
avril 12 14:19:47 vc-tvdelyonne systemd[1]: Starting A high performance web server and a reverse proxy server...
avril 12 14:19:47 vc-tvdelyonne nginx[16306]: nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/tv.virtuacenter.fr/fullchain.pem": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen:No such file or directory:fopen('/etc/letsencrypt/live/tv.virtuacenter.fr/fullchain.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
avril 12 14:19:47 vc-tvdelyonne nginx[16306]: nginx: configuration file /etc/nginx/nginx.conf test failed
avril 12 14:19:47 vc-tvdelyonne systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
avril 12 14:19:47 vc-tvdelyonne systemd[1]: nginx.service: Failed with result 'exit-code'.
avril 12 14:19:47 vc-tvdelyonne systemd[1]: Failed to start A high performance web server and a reverse proxy server.
似乎我缺少证书和目录,但我不知道是哪些或为什么会发生。
谢谢 !
解决方案
推荐阅读
- javascript - Firefox 扩展 - 如何按类和标题单击按钮?
- android - “生成的签名包”构建过程卡在 :app:uploadCrashlyticsMappingFileRelease 任务
- javascript - JSON数据有什么问题?
- postgresql - 使用ansible在psql server上执行sql命令
- mysql - 具有静态开始时间的 SQL 中的持续时间
- lwc - How to get field values from record in js in lwc
- javascript - 如何在导入时动态映射列名
- postgresql - 如何避免 Aurora Postgres 因大量插入(选择...)查询而内存不足?
- c# - C# ZipArchive 压缩整个存档而不是
- django - 没有这样的列:AGC.id Django