我经过多次试验和错误后终于在我的网站上获得了HTTPS。但是,当我运行
时,Let的加密证书无法续订sudo certbot renew --dry-run
我收到以下消息
1 renew failure(s), 0 parse failure(s)
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: www.din-pt.no
Type: unauthorized
Detail: Invalid response from
http://www.din-pt.no/.well-known/acme-challenge/pW5ACTpIbvnkdSpT-lBkRhfGR8steo_R5Zk-yMwQjOU:
"<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>"
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.
我使用
生成了证书sudo certbot certonly --webroot --agree-tos --no-eff-email --email kontakt@fossekalltek.no -w /var/www/ptpatrick.no/html/ -d www.din-pt.no -d din-pt.no
HTTPS正在该网站上运行。
我的续订配置让我们加密
renew_before_expiry = 30 days
version = 0.19.0
archive_dir = /etc/letsencrypt/archive/www.din-pt.no
cert = /etc/letsencrypt/live/www.din-pt.no/cert.pem
privkey = /etc/letsencrypt/live/www.din-pt.no/privkey.pem
chain = /etc/letsencrypt/live/www.din-pt.no/chain.pem
fullchain = /etc/letsencrypt/live/www.din-pt.no/fullchain.pem
# Options used in the renewal process
[renewalparams]
authenticator = webroot
installer = None
account = c0e77a8463a95263b6940fb41543b596
webroot_path = /var/www/ptpatrick.no/html,
[[webroot_map]]
www.din-pt.no = /var/www/ptpatrick.no/html
din-pt.no = /var/www/ptpatrick.no/html
我可以根据需要发布其他日志/设置,但我不确定你们想要什么。
使用Nginx运行Ubuntu 16.04
感谢您的回复!
我的网站的Nginx cnfig
答案 0 :(得分:0)
我找到了答案!我的nginx.conf中的第一台服务器只运行了没有&#34; www。&#34;在它面前,还添加了&#34; www。&#34;作为服务器名称解决了问题。