我正在按照这些说明在运行 Nginx 和 Ubuntu 14.04 的 DigitalOcean 站点上安装 Certbot 和 Let's Encrypt,但遇到了麻烦。
当我到达 alpha 插件部分时:certbot --nginx
我得到以下响应:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
No names were found in your configuration files. Please enter in your domain
name(s) (comma and/or space separated) (Enter 'c' to cancel):
我输入我的域名,按回车并获取:
Obtaining a new certificate
Performing the following challenges:
tls-sni-01 challenge for **MYDOMAINNAME**
Cleaning up challenges
Cannot find a VirtualHost matching domain **MYDOMAINNAME**.
我不确定如何克服这个错误。这是我的站点可用服务器块:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.html index.htm;
# Make site accessible from http://localhost/
server_name localhost;
location ~ /.well-known {
allow all;
root /usr/share/nginx/html;
}
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
}
有什么想法我哪里出错了吗?