Created
February 13, 2018 18:59
-
-
Save hatamiarash7/28b90bf8e61a4269b785898c3489a23d to your computer and use it in GitHub Desktop.
Force Nginx to use 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
server { | |
listen 80; | |
server_name mysite.com; | |
rewrite ^ https://$server_name$request_uri? permanent; | |
} | |
server { | |
listen 443; | |
... | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment