Skip to content

Instantly share code, notes, and snippets.

@kristianfreeman
Created November 23, 2013 21:06
Show Gist options
  • Save kristianfreeman/7619959 to your computer and use it in GitHub Desktop.
Save kristianfreeman/7619959 to your computer and use it in GitHub Desktop.
nginx.conf with HTTPS
server {
listen 80;
server_name MYURL.com;
return 301 https://$host$request_uri;
}
server {
# Static Site
listen 443 ssl;
server_name MYURL.com;
ssl_certificate MYKEY.crt;
ssl_certificate_key MYKEY.key;
add_header Strict-Transport-Security max-age=31536000;
location / {
root /MYSITE;
index index.html;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment