Created
June 2, 2015 02:50
-
-
Save codeprimate/0bf62b50767ea8ba65e1 to your computer and use it in GitHub Desktop.
NginX HTTPS Redirect
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 { | |
# ... | |
# force https-redirects | |
if ($scheme = http) { | |
return 301 https://$server_name$request_uri; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment