1 | $ wget https://dl.eff.org/certbot-auto |
1 | $ sudo /usr/local/bin/certbot-auto --nginx |
1 | Could not choose appropriate plugin: The nginx plugin is not working; there may be problems with your existing configuration. |
由于没有将nginx放到环境变量中,设置nginx软连接1
2$ ln -s /usr/local/nginx/sbin/nginx /usr/bin/nginx
$ ln -s /usr/local/nginx/conf/ /etc/nginx
1 | $ sudo /usr/local/bin/certbot-auto --nginx |
https://blog.csdn.net/guangcaiwudong/article/details/98858337
通过nginx -V查看nginxconfigure arguments没有安装ssl模板,在nginx目录中重新构建
cd /opt/nginx-1.14.0
./configure –with-http_ssl_module
执行 make
这里不要进行make install,否则就是覆盖安装。
使用sudo certbot certonly --nginx
生成证书,中间需要填写email和域名,生成成功后会提示证书存放路径:
1 | $ sudo /usr/local/bin/certbot-auto --nginx |
nginx从http跳转到https
https://www.cnblogs.com/nuccch/p/7681592.html
CentOS 7 下 安装 Let’s Encrypt 的通配符证书
sudo yum install epel-release
sudo yum install certbot
certbot –server https://acme-v02.api.letsencrypt.org/directory -d npe4j.com -d *.npe4j.com –manual –preferred-challenges dns-01 certonly
https://qizhanming.com/blog/2019/04/23/how-to-install-let-s-encrypt-wildcards-certificate-on-centos-7
https://www.infoq.cn/article/2018/03/lets-encrypt-wildcard-https
https://www.jianshu.com/p/c5c9d071e395
删除弃用的Let’s encrypt安全证书的域名
https://www.vmvps.com/how-to-delete-unused-lets-encrypt-ssl-domain.html
Let’s Encrypt 续期
crontab -e
0 1 /usr/local/bin/certbot-auto renew –no-self-upgrade
5 1 /usr/sbin/nginx -s reload
强制更新
–force-renew
查看日志
tail -F /var/log/letsencrypt/letsencrypt.log
查看crontab 日志
tail -30f /var/log/cron
报错
Could not find a usable ‘nginx’ binary. Ensure nginx exists, the binary is executable, and your PATH is set correctly