From af23a387f72d887709b728160b654215d829ea16 Mon Sep 17 00:00:00 2001 From: WETOOP <37586574+WETOOP@users.noreply.github.com> Date: Fri, 30 Mar 2018 02:57:37 +0800 Subject: [PATCH] Update Readme.md for AliCDN --- deploy/README.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/deploy/README.md b/deploy/README.md index 0b820dff..68d5ee3a 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -255,3 +255,41 @@ acme.sh --deploy -d fritzbox.example.com --deploy-hook fritzbox ```sh acme.sh --deploy -d ftp.example.com --deploy-hook strongswan ``` + +## 10. Deploy the cert to your AliCDN account + +You must specify the aliyun account credentials in order to deploy the certificate, optionally specify the prefix of your domain if you use wildcard in cdn domain, through the following environment variables: +```sh +export DEPLOY_CDN_Ali_Key="AK" +export DEPLOY_CDN_Ali_Secret="SK" +export DEPLOY_CDN_Ali_Prefix="" +``` + +After the first deployment, these values will be stored in your domain deploy conf. You may now deploy the certificate like this: + +```sh +acme.sh --deploy -d example.com --deploy-hook cdn_ali +``` + +If your cdn domain is cdn.example.com and cert domain is also cdn.example.com, you can leave the prefix empty in deployment: +```sh +export DEPLOY_CDN_Ali_Key="AK" +export DEPLOY_CDN_Ali_Secret="SK" +export DEPLOY_CDN_Ali_Prefix="" +acme.sh --deploy -d example.com --deploy-hook cdn_ali + +If your cdn domain is cdn.example.com but cert domain is example.com(subject alternative names: example.com,\*.example.com), you must specify the prefix in deployment: +```sh +export DEPLOY_CDN_Ali_Key="AK" +export DEPLOY_CDN_Ali_Secret="SK" +export DEPLOY_CDN_Ali_Prefix="cdn." +acme.sh --deploy -d example.com --deploy-hook cdn_ali +``` + +If your cdn domain is \*.example.com (added wildcard domain in AliCDN console) but cert domain is example.com(subject alternative names: example.com,\*.example.com), you must specify the prefix only a dot(.) in deployment: +```sh +export DEPLOY_CDN_Ali_Key="AK" +export DEPLOY_CDN_Ali_Secret="SK" +export DEPLOY_CDN_Ali_Prefix="." +acme.sh --deploy -d example.com --deploy-hook cdn_ali +```