在CentOS7中,手动使用 acme.sh 更新网站SSL证书,解决宝塔面板显示一片空白的智障问题

《在CentOS7中,手动使用 acme.sh 更新网站SSL证书,解决宝塔面板显示一片空白的智障问题》
先吐CAO一下宝塔面板,这个界面无论点什么都是一片空白,升级,重启 都无效,目前是用的宝塔英文版 aaPanel 6.8.14

既然连界面都看不到,也就别想使用更新证书的功能了.

首先安装acme

curl  https://get.acme.sh | sh

然后随便注册一个邮箱帐号

acme.sh --register-account -m 1232sa2322@aa.com

然后申请证书(域名替换成你自己的)

acme.sh --issue -d 123.com -d www.123.com --webroot  /www/wwwroot/123.com/

这时候如果一直提示
Processing, The CA is processing your order, please just wait.
那么你需要先把防火墙关闭
使用命令

systemctl stop firewalld.service

关闭后如果还是不行,就多执行几次,我就是执行了五六次才成功

成功后它会显示证书位置

[Sun Oct 24 14:12:19 CST 2021] Your cert is in: /root/.acme.sh/123.com/123.com.cer
[Sun Oct 24 14:12:19 CST 2021] Your cert key is in: /root/.acme.sh/123.com/123.com.key
[Sun Oct 24 14:12:19 CST 2021] The intermediate CA cert is in: /root/.acme.sh/123.com/ca.cer
[Sun Oct 24 14:12:19 CST 2021] And the full chain certs is there: /root/.acme.sh/123.com/fullchain.cer

对你有用的是

/root/.acme.sh/123.com/123.com.key
/root/.acme.sh/123.com/fullchain.cer

然后把上面两个文件分别复制到以下宝塔面板SSL证书的位置覆盖掉之前的(注意文件名是和下面的一样)

/www/server/panel/vhost/cert/123.com/privkey.pem
/www/server/panel/vhost/cert/123.com/fullchain.pem

最后再重新reload web服务器,或者重新启动也行.

对了如果你之前关闭了防火墙,现在请把它打开

systemctl start firewalld.service


发表评论

您的电子邮箱地址不会被公开。

+ 87 = 89