前些时间服务器配置了ipv6访问,后来就收到了let’s encrypt的邮件说域名ssl证书过时。但问题是certbot会应该是自动更新证书才对啊。html
登上服务器手动更新证书试下,提示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配置,检查了网站根目录的权限,彻底没用。nginx
在stackoverflow上有一个0赞的答案说到应该检查ipv6是否开启了,若是开启了就要加上 [::]:80 。服务器
一言惊醒梦中人啊,忽然想起前端时间确实启用了ipv6。因而打开gwlin.com的nginx配置文件,加上:app
{ //... server_name gwlin.com; listen 80; listen [::]:80; // 加这个 //... }
而后certbot更新证书,搞定。dom
参考文章:post
我的博客:https://www.gwlin.com/posts/5942code