良许Linux教程网 干货合集 letsencrypt的免费SSL证书续签及解决方案

letsencrypt的免费SSL证书续签及解决方案

SSL证书是数字证书的一种,类似于驾驶证、护照和营业执照的电子副本。因为配置在服务器上,也称为SSL服务器证书。SSL 证书就是遵守 SSL协议,由受信任的数字证书颁发机构CA,在验证服务器身份后颁发,具有服务器身份验证和数据传输加密功能。我们介绍 一下letsencrypt的免费SSL证书续签及解决办法

letsencrypt的免费SSL证书续签及解决方案

正常letsencrypt的免费SSL证书续签, 常常需要停止nginx

步骤:

就是先停nginx服务,然后续签操作,在服务器上即:

1. 直接续签证书

find / -name "certbot-auto"
/root/letsencrypt/certbot-auto
/root/certbot-auto

/root/letsencrypt/certbot-auto/certbot-auto renew --force-renew --no-self-upgrade

--force-renew 强制更新
--no-self-upgrade 不更新 letsencrypt

2. 续签证书失败(重新注册证书)

执行: /root/letsencrypt/certbot-auto certonly --standalone --no-self-upgrade -d xxxxx.com

若执行报以下错

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for xxxx.com
Cleaning up challenges
Problem binding to port 80: Could not bind to IPv4 or IPv6.

停止nginx
sudo /usr/sbin/nginx -s stop

启动nginx
nginx -c /etc/nginx/nginx.conf
nginx -s reload

最后

用2生成的新的 fullchain.pem 和privkey.pem 替换原来旧的,即可

cp /etc/letsencrypt/live/xxx.com-0001/fullchain.pem /etc/letsencrypt/live/xxx.com/fullchain.pem
cp /etc/letsencrypt/live/xxx.com-0001/privkey.pem /etc/letsencrypt/live/xxx.com/privkey.pem
sudo /usr/sbin/nginx -t
sudo /usr/sbin/nginx -s reload

访问网站, 可以看到证书已续签 !!

以上就是良许教程网为各位朋友分享的Linu系统相关内容。想要了解更多Linux相关知识记得关注公众号“良许Linux”,或扫描下方二维码进行关注,更多干货等着你 !

1ad5ad6eddc451da964a8888a6fd5266d0163210
本文由 良许Linux教程网 发布,可自由转载、引用,但需署名作者且注明文章出处。如转载至微信公众号,请在文末添加作者公众号二维码。
良许

作者: 良许

良许,世界500强企业Linux开发工程师,公众号【良许Linux】的作者,全网拥有超30W粉丝。个人标签:创业者,CSDN学院讲师,副业达人,流量玩家,摄影爱好者。
上一篇
下一篇

发表评论

1条评论

联系我们

联系我们

公众号:良许Linux

在线咨询: QQ交谈

邮箱: yychuyu@163.com

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

关注微博
返回顶部