标签:免费 numbers number sys protoc auto ssl post -name
Let‘s Encrypt 获取Https证书 假设安装目录:/root/letsencrypt
1.cd root目录安装git yum -y install git
2.输入 git clone https://github.com/letsencrypt/letsencrypt
3.cd letsencrypt
4.chmod +x letsencrypt-auto
5.安装证书
./letsencrypt-auto certonly --email 1649747584@qq.com -d networkstar.wang
6.自动续签:
a:执行 crontab -e
b:添加下面的配置
00 00 * * * /root/letsencrypt/certbot-auto renew --force-renewal --pre-hook "systemctl stop nginx" --post-hook "systemctl start nginx" >> /root/letsencrypt/letsencry.log 2>&1
7.ngix配置证书
listen 443 ssl;
ssl on;
ssl_certificate /root/letsencrypt/live/XXX.com/fullchain.pem;
ssl_certificate_key /root/letsencrypt/live/XXX.com/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
centos7 nigx 免费永久获取 Let‘s Encrypt 证书
标签:免费 numbers number sys protoc auto ssl post -name
原文地址:https://www.cnblogs.com/peachwts/p/12172932.html