certbot renew failure
用了 letsencrypt
的免费证书,过期前忘记续,过期后使用 certbot renew
提示续签失败。
最后用下面步骤解决:
- 先停掉
nginx
nginx -s stop
- 进行续签,由于 nginx 配置文件不在默认位置,指定了位置
certbot renew --nginx --nginx-server-root=/usr/local/openresty/nginx/conf
这里遇到了一个问题,cdn 域名无法续签,添加了 --dry-run
参数打印详细内容(certbot renew --dry-run
):
Hint:
The Certificate Authority failed to verify the temporary nginx configuration changes made by Certbot.
Ensure the listed domains point to this nginx server and that it is accessible from the internet.
这是因为 cdn
域名指向了供应商的机器,而不是自己的机器。
将 cdn
域名临时指回自己机器后重新 执行 certbot renew
后解决改问题
最后再把 cdn
域名重新指向供应商。