添加新证书和域名

sudo certbot certonly --webroot -w /path/to/webroot -d example.com -d www.example.com

手动续期证书

sudo certbot renew --cert-name example.com --force-renewal

需要关闭nginx,续期后再启动nginx。

自动定时检测和续签

sudo crontab -e 0 3 * * * certbot renew --quiet --deploy-hook "nginx -s reload"
作者:SteveChen  创建时间:2025-05-22 16:12
最后编辑:SteveChen  更新时间:2025-05-24 23:09
上一篇:
下一篇: