Replies: 2 comments 1 reply
-
腾讯云的Tencent_SecretId和Tencent_SecretKey |
Beta Was this translation helpful? Give feedback.
0 replies
-
其实也可以让acme.sh在docker之外运行用reload cmd来完成优化。 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
解决思路
操作步骤
1、使用acme.sh生成初步证书
可以直接使用acme.sh脚本,也可以使用容器,我使用了容器。
先拉取容器:
docker pull neilpang/acme.sh
再初始生成证书:
docker run --rm -it -v "/data/acme":/acme.sh neilpang/acme.sh --issue --dns dns_tencent -d *.987654321.xyz -d 987654321.xyz --yes-I-know-dns-manual-mode-enough-go-ahead-please
这里我使用的是腾讯云的域名服务,如果是其他DNS注册商,请更改dns_tencent ,具体参考acme.sh文档。987654321.xyz 为需要使用的域名。
具体acme.sh过程不赘述,需要提供各DNS注册商的SecretId、SecretKey。初次申请SSL证书运行成功之后可以补充到/data/acme/account.conf文件中。
2、雷池WAF中添加证书
把上一步的SSL下载到本地之后,在雷池WAF中“防护站点”->"证书管理" 中添加证书或者更新证书。这里获取证书在雷池WAF中的id。一般第一个是1 第二个是2,具体ID请自行获取(友情提示:按F12再编辑证书可见ID)
3、添加更新脚本
建立脚本目录:
mkdir /data/acme/scripts
建立证书归档目录:
mkdir /data/acme/archived/
编辑脚本:
vi /data/acme/scripts/renew.sh
进入编辑模式之后输入一下内容
脚本说明:
4、添加定时任务
crontab -e 添加定时任务
15 1 1,15 * * /data/acme/scripts/renew.sh >/dev/null
在1号15号1点15分调度任务执行,可以根据需要修改。
大家玩得愉快
Beta Was this translation helpful? Give feedback.
All reactions