Skip to content

Instantly share code, notes, and snippets.

@fenying
Last active December 12, 2018 09:46
Show Gist options
  • Save fenying/f29fc165c3a774c024967a66d1e37743 to your computer and use it in GitHub Desktop.
Save fenying/f29fc165c3a774c024967a66d1e37743 to your computer and use it in GitHub Desktop.
Issue SSL cert with AliDNS by ACME.sh
export Ali_Key="<ACCESS_KEY>"
export Ali_Secret="<SECRET_KEY>"
THE_DOMAIN=litert.org
THE_CERT_OUTPUT_DIR=/etc/nginx/ssl.d
mkdir -p $THE_CERT_OUTPUT_DIR
acme.sh --issue \
--dns dns_ali \
-d "$THE_DOMAIN" \
-d "*.$THE_DOMAIN" \
--cert-file "$THE_CERT_OUTPUT_DIR/$THE_DOMAIN.cert.pem" \
--key-file "$THE_CERT_OUTPUT_DIR/$THE_DOMAIN.key.pem" \
--ca-file "$THE_CERT_OUTPUT_DIR/$THE_DOMAIN.ca.pem" \
--fullchain-file "$THE_CERT_OUTPUT_DIR/$THE_DOMAIN.fullchain.pem" \
--reloadcmd "service nginx restart"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment