创建 letsencrypt 证书失败

creating letsencrypt certificate fails

我在 ubuntu 17.10。看起来成功安装了 certbot。 当我 运行

sudo certbot --apache -d mywebsite.com -d www.mywebsite.com

我得到一个错误:

root@servername:~# sudo certbot --apache -d mywebsite.ca -d www.mywebsite.ca
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for mywebsite.ca
http-01 challenge for www.mywebsite.ca
Enabled Apache rewrite module
Error while running apache2ctl graceful.
httpd not running, trying to start
Action 'graceful' failed.
The Apache error log may have more information.

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs

有什么想法吗? 显然 apache 不是 运行ning,但没关系,我正在使用 nginx,所以我不需要 apache。或者我呢?

如果你是运行nginx服务器,使用nginx插件(不是apache):

sudo certbot --nginx -d mywebsite.com -d www.mywebsite.com