Add the deploy-hook: Deploy to Alibaba Cloud CDN (#5205)
parent
06991049f8
commit
734e74f0a0
|
@ -993,3 +993,64 @@ export DEPLOY_KEYHELP_ENFORCE_HTTPS="1"
|
||||||
|
|
||||||
acme.sh --deploy -d example.com --deploy-hook keyhelp
|
acme.sh --deploy -d example.com --deploy-hook keyhelp
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## 33. Deploy your certificate to Alibaba Cloud CDN (Aliyun)
|
||||||
|
|
||||||
|
使用 acme.sh 部署到阿里云 CDN 之前,需要先创建[访问密钥](https://help.aliyun.com/zh/ram/user-guide/create-an-accesskey-pair),并赋予[相应权限](https://help.aliyun.com/zh/cdn/developer-reference/api-cdn-2018-05-10-setcdndomainsslcertificate#api-detail-31)。
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ export Ali_Key="foo"
|
||||||
|
$ export Ali_Secret="bar"
|
||||||
|
```
|
||||||
|
|
||||||
|
该访问密钥,与其它阿里云相关服务共享(例如 DNS API 中的 `dns_ali` 功能)。如果已经在其它地方设置过 `Ali_Key` 和 `Ali_Secret` 变量,会自动复用。
|
||||||
|
|
||||||
|
完成准备工作之后,您就可以通过下面的命令开始部署 SSL 证书到阿里云 CDN :
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ acme.sh --deploy -d example.com --deploy-hook ali_cdn
|
||||||
|
```
|
||||||
|
|
||||||
|
假如您部署的证书为泛域名证书,您还需要设置 `DEPLOY_ALI_CDN_DOMAIN` 变量,指定实际需要部署的域名:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ export DEPLOY_ALI_CDN_DOMAIN="cdn.example.com"
|
||||||
|
$ acme.sh --deploy -d example.com --deploy-hook ali_cdn
|
||||||
|
```
|
||||||
|
|
||||||
|
假如需要部署多个域名, 使用空格将域名分隔开来:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ export DEPLOY_ALI_CDN_DOMAIN="cdn1.example.com cdn2.example.com"
|
||||||
|
$ acme.sh --deploy -d example.com --deploy-hook ali_cdn
|
||||||
|
```
|
||||||
|
|
||||||
|
### English version
|
||||||
|
|
||||||
|
You should [create an AccessKey pair](https://www.alibabacloud.com/help/en/ram/user-guide/create-an-accesskey-pair) and [give it the proper permissions](https://www.alibabacloud.com/help/en/cdn/developer-reference/api-cdn-2018-05-10-setcdndomainsslcertificate#api-detail-31) before deploying your certificate.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ export Ali_Key="foo"
|
||||||
|
$ export Ali_Secret="bar"
|
||||||
|
```
|
||||||
|
|
||||||
|
then you can deploy certificate by following command:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ acme.sh --deploy -d example.com --deploy-hook ali_cdn
|
||||||
|
```
|
||||||
|
|
||||||
|
(Optional), If you are using wildcard certificate,
|
||||||
|
you may need export `DEPLOY_ALI_CDN_DOMAIN` to specify which domain you want to update:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ export DEPLOY_ALI_CDN_DOMAIN="cdn.example.com"
|
||||||
|
$ acme.sh --deploy -d example.com --deploy-hook ali_cdn
|
||||||
|
```
|
||||||
|
|
||||||
|
If you want to deploy more than one domain, just use space to split them:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ export DEPLOY_ALI_CDN_DOMAIN="cdn1.example.com cdn2.example.com"
|
||||||
|
$ acme.sh --deploy -d example.com --deploy-hook ali_cdn
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in New Issue