DNSPOD和CertBot结合使用来自动生成通配符的SSl证书

作者: shaneZhang 分类: 互联网技术 发布时间: 2019-03-14 00:05

今天晚上找到了一个dnspod的插件,由于certbot生成通配符的ssl证书在dns配置环节可谓是非常之麻烦,麻烦,于是刚刚好又发现了这个插件,终于可以自动化的配置了。

安装python插件
sudo apt-get install python3-setuptools
sudo easy_install3 pip
sudo pip install certbot-dns-dnspod
根据https://github.com/SkyLothar/certbot-dns-dnspod这个插件的作者提示,需要先创建一个dns鉴权的配置文件.此处需要申请dnspod的密钥。密钥格式为"id,key"的方式,这里一定不能写错。
vim /etc/letsencrypt/dnspod.conf
certbot_dns_dnspod:dns_dnspod_email = "DNSPOD邮箱"
certbot_dns_dnspod:dns_dnspod_api_token = "id,key"

然后新创建通配符域名:
sudo certbot certonly --server https://acme-v02.api.letsencrypt.org/directory -a certbot-dns-dnspod:dns-dnspod --certbot-dns-dnspod:dns-dnspod-credentials /etc/letsencrypt/dnspod.conf -d "www.5288z.com" -d "*.www.5288z.com"

然后到期后的续期操作:
sudo certbot renew --server https://acme-v02.api.letsencrypt.org/directory -a certbot-dns-dnspod:dns-dnspod --certbot-dns-dnspod:dns-dnspod-credentials /etc/letsencrypt/dnspod.conf

这样通过以上的脚本就可以自动化配置ssl 证书了,感谢一下插件的作者,好开心呀。😆

本页面支持繁体中文友好显示:DNSPOD和CertBot结合使用来自动生成通配符的SSl证书

如果觉得我的文章对您有用,请随意打赏。如果有其他问题请联系博主QQ(909491009)或者下方留言!

发表回复