标签归档:泛域名

letsencrypt https证书自动更新和续期(支持泛域名)

安装阿里云获取证书插件

https://github.com/tengattack/certbot-dns-aliyun

certbot certonly -a certbot-dns-aliyun:dns-aliyun \
    --certbot-dns-aliyun:dns-aliyun-credentials /data/aliyun.ini \
    -d c4ys.com \
    -d *.c4ys.com

安装腾讯云(dnspod)获取证书插件

https://github.com/tengattack/certbot-dns-dnspod

certbot certonly -a certbot-dns-dnspod:dns-dnspod \
    --certbot-dns-dnspod:dns-dnspod-credentials /data/aliyun.ini \
    -d c4ys.com \
    -d *.c4ys.com

查看已经安装插件

certbot plugins

更新证书

certbot renew

自动重新加载nginx(需要更新成功后,所以等前一个任务进行几分钟之后再执行)

nginx -s reload