certbot Ubuntu 自动更新 nginx证书
- 安装 - sudo snap install --classic certbot sudo ln -s /snap/bin/certbot /usr/bin/certbot
- 获取证书 - sudo certbot certonly --webroot -w /data/wwwroot/iguojin.com/ -d iguojin.com
- 挂载docker - /etc/letsencrypt:/etc/nginx/ssl/letsencrypt
- 配置nginx - ssl_certificate /etc/nginx/ssl/letsencrypt/live/iguojin.com/fullchain.pem; ssl_certificate_key /etc/nginx/ssl/letsencrypt/live/iguojin.com/privkey.pem;
- 自动更新 - sudo certbot renew --dry-run- 执行这个命令后,他会自动配置定时任务,在如下位置之一 - /etc/crontab/ /etc/cron.*/* systemctl list-timers
- 通过阿里云DNS 
 https://github.com/tengattack/certbot-dns-aliyun- sudo snap install certbot-dns-aliyun sudo snap set certbot trust-plugin-with-root=ok sudo snap connect certbot:plugin certbot-dns-aliyun /snap/bin/certbot plugins certbot certonly --authenticator=dns-aliyun --dns-aliyun-credentials='/ssl_conf/credentials.ini' -d "*.iguojin.com"
最后更新于 2024-09-13 12:46:50 并被添加「」标签,已有 1279 位童鞋阅读过。
此处评论已关闭