利用API功能实现本地证书自动更新到网站 #7772
zizzdog
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
1panel支持的dns厂商有限,所以我使用acme.sh来实现自动申请证书到本地。参考这个docker版acme.sh使用
1、准备工作
假设按照教程证书下载了
你的域名.key
fullchain.cer
在面板设置中打开
API接口
选项,复制详情中的接口秘钥
,IP白名单最好只填127.0.0.1
保证安全性,接口秘钥有效期最好也设置短一点,1分钟也够用了。2、设置定时任务
在面板的计划任务中,创建一个计划任务,类型为Shell,执行时间为每天4点,输入以下代码,注意填写一下其中的参数
Beta Was this translation helpful? Give feedback.
All reactions