跳到主要内容
版本:latest

SetCertToSite (SSL)

将证书夹中已保存的 SSL 证书部署到指定网站,开启 HTTPS。

  • 路由POST /ssl
  • actionSetCertToSite

输入参数

参数名称必选类型描述
actionString固定值 SetCertToSite
ssl_hashString证书 hash(通过 get_cert_list 获取)
siteNameString目标网站域名

输出参数

参数名称类型描述
statusBooleantrue 部署成功
msgStringSSL开启成功!
csrString部署的证书链(PEM 格式)

示例

请求

POST /ssl HTTP/1.1
Host: 192.168.168.213:8888
Content-Type: application/x-www-form-urlencoded

action=SetCertToSite&ssl_hash=6da02a66c92a01d07b3aab68bf1317e6&siteName=testapi.bt.local

响应

{"status": true, "msg": "SSL开启成功!", "csr": "-----BEGIN CERTIFICATE-----\n..."}

相关接口