skywing 发表于 2017-8-23 14:26:10

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

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

licess 发表于 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 进行更新

skywing 发表于 2017-8-24 08:33:48

回复 2# 的帖子

谢谢军哥,搞定了。。。

455089951 发表于 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
Saving to: “STDOUT”

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

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

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.

455089951 发表于 2017-8-25 02:26:36

回复 2# 的帖子

cat /var/log/letsencrypt/letsencrypt.log
2017-08-24 18:23:18,738:DEBUG:certbot.main:certbot version: 0.17.0
2017-08-24 18:23:18,738:DEBUG:certbot.main:Arguments: ['--disable-hook-validation', '--renew-hook', '/etc/init.d/nginx reload']
2017-08-24 18:23:18,738:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2017-08-24 18:23:18,771:DEBUG: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,772:DEBUG:certbot.renewal:no renewal failures


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

licess 发表于 2017-8-25 10:15:14

回复 4# 的帖子

上面没有错误信息,还没到lesencrypt规定的日期是不会执行续期操作的
页: [1]
查看完整版本: 请问LNMP1.4自动安装的证书如何更新