1.在cf里做一个dns的a记录域名.com指向ip,仅dns
2.在服务器申请泛域名证书
2.1.安装证书管理工具acme
curl https://get.acme.sh | sh -s email=邮箱.com
2.2.配置api和email
export CF_Key="你的Global_API_Key"
export CF_Email="你的Cloudflare注册邮箱"
2.3.注册一个邮箱
~/.acme.sh/acme.sh --register-account -m 邮箱@gmail.com
2.4.执行申请命令(得到key和cert两个文件)
~/.acme.sh/acme.sh --issue --dns dns_cf -d 域名.com -d *.域名.com
2.5.执行安装证书命令(把这两个文件放到指定目录,到期自动重启)
mkdir -p /etc/sui/
~/.acme.sh/acme.sh --install-cert -d 域名.com \
--key-file /etc/sui/key.pem \
--fullchain-file /etc/sui/cert.pem \
--reloadcmd "systemctl restart s-ui"
3.在s-ui面板里设置对应的证书目录和私钥目录和其他参数。

发表回复