https证书申请-certbot
- 安装certbot
yum install certbot
- 申请证书
sudo certbot certonly --standalone -d example.com -d www.example.com
- 更新证书
certbot renew --dry-run
- 自动续期
crontab -e
0 0 * * * docker stop nginx-web;certbot renew --dry-run;cp /etc/letsencrypt/live/dev.anlitech.com/privkey.pem /mnt/nginx/www/cert/dev.anlitech.com.key;cp /etc/letsencrypt/live/dev.anlitech.com/fullchain.pem /mnt/nginx/www/cert/dev.anlitech.com.pem;docker restart nginx-web