This commit is contained in:
ywdblog 2019-02-02 10:47:21 +08:00
parent 5ccb998e22
commit f70bca07ca

View File

@ -100,9 +100,29 @@ $ ./certbot-auto renew --cert-name simplehttps.com --manual-auth-hook /脚本
编辑文件 /etc/crontab :
```
#证书有效期<30天才会renew所以crontab可以配置为1天或1周
1 1 */1 * * root certbot-auto renew --manual --preferred-challenges dns --manual-auth-hook /脚本目录/au.sh
```
如果是certbot 机器和运行web服务比如 nginxapache的机器是同一台那么成功renew证书后可以启动对应的web 服务器运行下列crontab :
```
# 注意只有成功renew证书才会重新启动nginx
1 1 */1 * * root certbot-auto renew --manual --preferred-challenges dns -deploy-hook "service nginx restart" --manual-auth-hook /脚本目录/au.sh
```
**注意只有单机建议这样运行如果要将证书同步到多台web服务器需要有别的方案**
### ROADMAP
1: 关于申请 SAN 证书
如果你想为 example.com,*.example.com 生成一张证书目前会有Bug可以查看下面的 [issues]( https://github.com/ywdblog/certbot-letencrypt-wildcardcertificates-alydns-au/issues/21) 临时解决。
2rsync 证书
本工具只是生成或renew证书一旦成功后需要将证书同步到其他服务器上大型应用肯定有多台机器比如nginxapachehaproxy应用场景不一样所以很难有统一的方案后面可以考虑写个 github 仓库解决下。
### 其他
- 可以关注公众号虞大胆的叽叽喳喳yudadanwx了解更多密码学&HTTPS协议知识。