Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Nginx SSL Configuration for Let's Encrypt.
listen 443 http2 ssl;
ssl on;
ssl_certificate /etc/letsencrypt/live/<your-domain>/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/<your-domain>/privkey.pem;
@Nikschavan

This comment has been minimized.

Copy link
Owner Author

Nikschavan commented Jan 29, 2018

  1. Download the file to the directory to the config directory of the new domain
curl -L https://gist.githubusercontent.com/Nikschavan/be9cbc0e738268ad063a6fe3b72547c7/raw/faa3bdd37aa8a9459e2b5710fc6bd0d367f80cf5/ssl.conf.template -o <your-domain-name-here>/conf/nginx/ssl.conf
  1. Replace the dummy domain name from the template to your correct domain name.
    Note - Replace <replace-your-domain-name-here> with the actual domain name.
sed -i.default "s/<your-domain>/<replace-your-domain-name-here>/" <replace-your-domain-name-here>/conf/nginx/ssl.conf
  1. Reload Nginx Configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.