VPS侦探论坛

 找回密码
 注册
查看: 3347|回复: 5

请问LNMP1.4自动安装的证书如何更新

[复制链接]
发表于 2017-8-23 14:26:10 | 显示全部楼层 |阅读模式

安装时选择的是LNMP自动申请配置的Let's Encrypt证书,记得之前在主站上看到说这个证书在添加时就会自动添加更新任何,每个月自动更新一次,但我的证书到现在已经两个多月快过期了,还没有更新,请问怎么手动更新呢?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-8-23 15:23:11 | 显示全部楼层


执行一下:/bin/certbot renew --disable-hook-validation --renew-hook "/etc/init.d/nginx reload"
(crontab -l ; echo '0 3 */7 * * /bin/certbot renew --disable-hook-validation --renew-hook "/etc/init.d/nginx reload"') | crontab -

有可能是certbot程序更新了,需要加上一个参数,然后看一下是否更新成功

也可以直接 wget -O - https://soft.vpser.net/lnmp/ext/fix_renewssl.sh|bash 进行更新
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2017-8-24 08:33:48 | 显示全部楼层

回复 2# 的帖子


谢谢军哥,搞定了。。。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-8-25 02:23:04 | 显示全部楼层

回复 2# 的帖子




按照你说的自动更新命令是有错误的
wget -O - https://soft.vpser.net/lnmp/ext/fix_renewssl.sh|bash
--2017-08-25 02:22:27--  https://soft.vpser.net/lnmp/ext/fix_renewssl.sh
Resolving soft.vpser.net... 50.93.201.152, 2604:a880:1:20::5f9:4001
Connecting to soft.vpser.net|50.93.201.152|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 853 [application/octet-stream]
Saving to: “STDOUT”

100%[======================================>] 853         --.-K/s   in 0s

2017-08-25 02:22:27 (105 MB/s) - written to stdout [853/853]

no crontab for root
Try to run certbot renew script...
/root/.local/share/letsencrypt/lib/python2.6/site-packages/cryptography/__init__.py:26: DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of cryptography will drop support for Python 2.6
  DeprecationWarning
Saving debug log to /var/log/letsencrypt/letsencrypt.log

No renewals were attempted.
No hooks were run.
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2017-8-25 02:26:36 | 显示全部楼层

回复 2# 的帖子


cat /var/log/letsencrypt/letsencrypt.log
2017-08-24 18:23:18,738EBUG:certbot.main:certbot version: 0.17.0
2017-08-24 18:23:18,738EBUG:certbot.main:Arguments: ['--disable-hook-validation', '--renew-hook', '/etc/init.d/nginx reload']
2017-08-24 18:23:18,738EBUG:certbot.mainiscovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2017-08-24 18:23:18,771EBUG:certbot.log:Root logging level set at 20
2017-08-24 18:23:18,771:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2017-08-24 18:23:18,772EBUG:certbot.renewal:no renewal failures


这里是打开里面的安装日志的反馈结果.

军哥运维代购:http://shop63846532.taobao.com/

发表于 2017-8-25 10:15:14 | 显示全部楼层

回复 4# 的帖子


上面没有错误信息,还没到lesencrypt规定的日期是不会执行续期操作的
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-25 13:20 , Processed in 0.041077 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表