Skip to content

Instantly share code, notes, and snippets.

@quantenschaum
Created January 7, 2018 17:02
Show Gist options
  • Save quantenschaum/e008f6a124a1bb075c02b3286bb5e1f9 to your computer and use it in GitHub Desktop.
Save quantenschaum/e008f6a124a1bb075c02b3286bb5e1f9 to your computer and use it in GitHub Desktop.
nginx default config
server {
listen 80 default_server;
server_name _;
# For Lets Encrypt, this needs to be served via HTTP
location /.well-known/acme-challenge/ {
root /var/www/html; # Specify here where the challenge file is placed
}
# enforce https
location / {
return 301 https://$host$request_uri;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment