Created
June 28, 2015 18:24
-
-
Save techgaun/190195d237eb0b25a93c to your computer and use it in GitHub Desktop.
Redirect all http domains to 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 default deferred; | |
| server_name domain.tld; | |
| return 301 https://$host$request_uri; # $host - http://wiki.nginx.org/HttpCoreModule#.24host | |
| # $host does not include port | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment