打印

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

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

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

TOP

执行一下:/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 进行更新

TOP

回复 2# 的帖子

谢谢军哥,搞定了。。。

TOP

回复 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.

TOP

回复 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


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

TOP

回复 4# 的帖子

上面没有错误信息,还没到lesencrypt规定的日期是不会执行续期操作的

TOP