让我们encryptionvalidation失败

尝试使用Let's Encrypt生成新的SSL证书,请遵循本指南 – https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-14- 04但是正在validation失败。

我确定我的DNS设置正确,并指向我的服务器的IP地址。

我有一种感觉,我的webroot是不正确的。

在我的/etc/nginx/sites-available/default我有allow all参数设置 –

 server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /usr/share/nginx/html; index index.php index.html index.htm; server_name localhost; location ~ /.well-known { allow all; } location / { try_files $uri $uri/ =404; } error_page 404 /404.html; error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } 

然后运行./letsencrypt-auto certonly -a webroot --webroot-path=/usr/share/nginx/html -d domain.com ,它与默认的nginxconfiguration中设置的webrootpath匹配。

我错过了什么?

我在Ubuntu 14上运行nginx

一个小提醒,你需要有你的主机服务器支持nginx和监听SSL协议,否则会引起问题,说你的服务器不会说SSL

另外,它看起来像是你只允许主机ipv6连接,所以检查你的DNSlogging是使用AAAAlogging,而不是正常的Alogging(这是用于ipv4)。 Certbot需要能够连接到您的主机来应对挑战

您可以按照这里的说明手动validation您的域名

我通过以下步骤validation了我的内容:

  1. 按照说明安装certbot。
  2. 停止nginx
  3. 执行sudo certbot certonly --standalone -d your_domain.com