关于ghost:Ghost-博客-SSL-证书过期的解决办法

问题明天拜访我的 Ghost 博客 的时候,发现进不去了: 网上找的图,不过就是这个样子,过后忘了截图 点击 高级 也没有进去的链接,而且页面地址后面写着”不平安“,证书显示也曾经过期一个月了。而且我本人部署的 flask 服务也拜访不了了。 起因Ghost 自身其实会主动 renew 证书,可应用如下命令查看定时工作: $ sudo crontab -l14 0 * * * "/etc/letsencrypt"/acme.sh --cron --home "/etc/letsencrypt" > /dev/null有这个输入就示意会主动 renew。然而依据网上的说法,Ghost 没有及时降级 /etc/letsencrypt/acme.sh 版本,造成 renew 失败之类的。 我看同目录下的 account.conf 中有一行是这样的: #AUTO_UPGRADE="1"主动降级默认是被正文掉的,不过我也不能百分比确定勾销正文就会主动降级。具体我也不是很懂,就不多说了,就提一嘴。 解决所以总而言之,就是要降级 acme.sh 而后重启 Ghost。 进入 acme.sh 目录: $ cd /etc/letsencrypt备份原文件: $ sudo cp acme.sh acme.sh.bk降级: $ sudo ./acme.sh --upgrade./acme.sh: line 6192: cd: /home/username/.acme.sh: No such file or directory[Fri Apr 30 09:47:22 CST 2021] Installing from online archive.[Fri Apr 30 09:47:22 CST 2021] Downloading https://github.com/Neilpang/acme.sh/archive/master.tar.gztouch: cannot touch '/home/username/.acme.sh/http.header': No such file or directory[Fri Apr 30 09:48:36 CST 2021] Extracting master.tar.gz[Fri Apr 30 09:48:36 CST 2021] It is recommended to install socat first.[Fri Apr 30 09:48:36 CST 2021] We use socat for standalone server if you use standalone mode.[Fri Apr 30 09:48:36 CST 2021] If you don't use standalone mode, just ignore this warning.[Fri Apr 30 09:48:36 CST 2021] Installing to /home/username/.acme.sh[Fri Apr 30 09:48:36 CST 2021] Installed to /home/username/.acme.sh/acme.sh[Fri Apr 30 09:48:36 CST 2021] Good, bash is found, so change the shebang to use bash as preferred.[Fri Apr 30 09:48:37 CST 2021] OK[Fri Apr 30 09:48:37 CST 2021] Install success![Fri Apr 30 09:48:37 CST 2021] Upgrade success!降级后的文件是放在 home 目录下的,所以要 cp 过去: ...

May 7, 2021 · 3 min · jiezi