https://certbot.eff.org/lets-encrypt/centosrhel7-nginx
// centos 7
yum -y install yum-utils
yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional
yum install certbot python2-certbot-nginx
certbot --nginx
// crontab
echo "0 0,12 * * * root python -c 'import random; import time; time.sleep(random.random() * 3600)' && certbot renew" | sudo tee -a /etc/crontab > /dev/null
几步就完成了, 注意事项是, nginx 配置文件不要写中文(注释也不行), 会有编译问题
网友评论