在新增或删除域名时,如果你使用了 dnspod 插件则参考以下进行:
certbot certonly \ -a dns-dnspod \ --dns-dnspod-credentials /etc/certbot-au/credentials.ini \ -d a.cn -d *.a.cn \ -d b.com -d *.b.com \ -d c.cn -d *.c.cn \ --post-hook "service nginx start"
执行会后重新获取证书:
如果证书未过期,则会保持当前,或重新获取。(建议在临期时执行)
也可删除现有证书:
# 1. 查看现有证书,确认证书名称 certbot certificates</code> # 2. 删除旧证书(假设证书名是 abc.com) certbot delete --cert-name abc.com # 3. 签发新证书(只包含想要保留的域名) # 重新使用上述命令签发 # 4. 验证新证书是否正确 certbot certificate