之前配置证书一直用https://github.com/acmesh-official/acme.sh
,网络原因生成时好时坏;换成Certbot
后简单多了
contos7
下安装Certbot
certbot
官网:https://certbot.eff.org/instructions
先安装snapd
官网https://snapcraft.io/docs/installing-snap-on-centos
1 | sudo yum install epel-release |
更新snapd
1 | sudo snap install core; |
安装Certbot
1 | sudo snap install --classic certbot |
nginx证书
会自动找到conf
所有域名并设置好证书
1 | sudo certbot --nginx |