Skip to content

Instantly share code, notes, and snippets.

@asobrien
Created March 30, 2017 14:39
Show Gist options
  • Save asobrien/90ad1cb5bb60d9d9552a60e20c9b42a4 to your computer and use it in GitHub Desktop.
Save asobrien/90ad1cb5bb60d9d9552a60e20c9b42a4 to your computer and use it in GitHub Desktop.
Simple nginx default configuration with HTTPS enabled
server {
listen 80;
server_name _;
listen 443 ssl;
ssl_certificate /etc/nginx/ssl/nginx.crt;
ssl_certificate_key /etc/nginx/ssl/nginx.key;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment