let’s encrypt ipv6下更新ssl证书404问题
文章目录
前些时间服务器配置了ipv6访问,后来就收到了let’s encrypt的邮件说域名ssl证书过期。但问题是certbot会应该是自动更新证书才对啊。
登上服务器手动更新证书试下,提示404错误:
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: gwlin.com
Type: unauthorized
Detail: Invalid response from
http://gwlin.com/.well-known/acme-challenge/eHOBoFPw4Uz5vM9Xzk9D91nsm292bxSNyuePVerQRMY
[2600:3c01::f03c:92ff:fee2:491b]: "<html>rn<head><title>404 Not
Found</title></head>rn<body bgcolor="white">rn<center><h1>404
Not Found</h1></center>rn<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. 于是谷歌一顿,但文章都在说是well-known目录的配置问题,于是检查了nginx配置,检查了网站根目录的权限,完全没用。
在stackoverflow上有一个0赞的答案说到应该检查ipv6是否开启了,如果开启了就要加上 [::]:80 。
一言惊醒梦中人啊,突然想起前端时间确实启用了ipv6。于是打开gwlin.com的nginx配置文件,加上:
{
//...
server_name gwlin.com;
listen 80;
listen [::]:80; // 加这个
//...
}然后certbot更新证书,搞定。
参考文章:
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论