Last active
March 10, 2017 10:30
-
-
Save 4lun/1702eda65e0485750716f71270c09a4c to your computer and use it in GitHub Desktop.
Generate and install SSL certificate with letsencrypt (for nginx)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export DOMAIN="mydomain.com" | |
curl https://get.acme.sh | sh | |
bash --login | |
mkdir -p /etc/nginx/certs/$DOMAIN/ | |
acme.sh --issue -d $DOMAIN -w /var/www/$DOMAIN/public/ | |
acme.sh --install-cert -d $DOMAIN \ | |
--certpath /etc/nginx/certs/$DOMAIN/cert.pem \ | |
--keypath /etc/nginx/certs/$DOMAIN/key.pem \ | |
--fullchainpath /etc/nginx/certs/$DOMAIN/fullchain.pem \ | |
--reloadcmd "nginx -s reload" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment