Skip to content

Instantly share code, notes, and snippets.

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;

This comment has been minimized.

Copy link
Owner Author

@Nikschavan Nikschavan commented Jan 29, 2018

  1. Download the file to the directory to the config directory of the new domain
curl -L -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.