Skip to content

Instantly share code, notes, and snippets.

@mosquito
Created October 4, 2017 11:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mosquito/c09880e8d0062b175a6a8326a1e55328 to your computer and use it in GitHub Desktop.
Save mosquito/c09880e8d0062b175a6a8326a1e55328 to your computer and use it in GitHub Desktop.
Nginx Letsencrypt Config
# cat /etc/nginx/sites-enabled/00-default.conf
server {
listen 80 default deferred;
include default.d/*.conf;
location / {
rewrite ^/(.*)$ https://$host/$1 redirect;
}
}
# cat /etc/nginx/default.d/le-well-known.conf
location /.well-known {
allow all;
root /var/www/le;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment