cPanel 部署
适合虚拟主机或 cPanel 账户。
方式 A:面板支持自定义 ACME
如果 cPanel 或主机商提供自定义 ACME 设置,请填写:
- Server URL
- EAB MAC ID
- EAB MAC key
保存后运行 Auto SSL。
完成后访问:
text
https://example.com方式 B:SSH + acme.sh
如果 cPanel 提供 Terminal 或 SSH,可以使用网站目录验证。
1. 设置变量
bash
export DOMAIN="example.com"
export EMAIL="admin@example.com"
export ACME_SERVER="你的 Server URL"
export EAB_KID="你的 EAB MAC ID"
export EAB_HMAC_KEY="你的 EAB MAC key"
export WEBROOT="$HOME/public_html"2. 安装并注册
bash
curl https://get.acme.sh | sh -s email="$EMAIL"
~/.acme.sh/acme.sh --register-account \
--server "$ACME_SERVER" \
--eab-kid "$EAB_KID" \
--eab-hmac-key "$EAB_HMAC_KEY" \
-m "$EMAIL"3. 签发证书
bash
~/.acme.sh/acme.sh --issue \
--server "$ACME_SERVER" \
-d "$DOMAIN" \
-w "$WEBROOT"证书文件通常在:
text
~/.acme.sh/example.com_ecc/或:
text
~/.acme.sh/example.com/4. 在 cPanel 安装
进入:
text
SSL/TLS -> Manage SSL sites粘贴:
- Certificate:
fullchain.cer - Private Key:
example.com.key
保存后访问:
text
https://example.com