Created
February 13, 2017 20:49
-
-
Save strangerstudios/cfaed89ed3bed51079d515a34c9cba60 to your computer and use it in GitHub Desktop.
nginx configuration to redirect http to https
This file contains 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
#nginx configuration to redirect http to https | |
# from https://www.bjornjohansen.no/redirect-to-https-with-nginx | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
server_name _; | |
return 301 https://$host$request_uri; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks very helpful