Created
November 23, 2013 21:06
-
-
Save kristianfreeman/7619959 to your computer and use it in GitHub Desktop.
nginx.conf with HTTPS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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