我正在尝试使用 certbot 从我家的服务器将 ssl 添加到已经工作的站点(krementimg.us.to)。此服务器在 Ubuntu 16.04 上运行 Nginx 后面的节点应用程序。按照此处的说明,我的 etc/nginx/sites-available/default(我的配置文件)如下所示:
server {
server_name krementimg.us.to;
client_max_body_size 20M;
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
location / {
proxy_pass http://localhost:443;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
Nginx 侦听端口 80 并将客户端定向到在端口 443 上运行的应用程序。所有这些工作正常,但是,当我sudo certbot --nginx
按照 certbot 网站上的说明运行命令时,我收到错误
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: krementimg.us.to
Type: connection
Detail: Error getting validation data
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address. Additionally, please check that
your computer has a publicly routable IP address and that no
firewalls are preventing the server from communicating with the
client. If you're using the webroot plugin, you should also verify
that you are serving files from the webroot path you provided.
我想在我的网站上有 ssl,那么我该如何解决这个问题?