Created
April 8, 2018 09:25
-
-
Save paulund/5fb069205b3a25e5f75b3448c056ce07 to your computer and use it in GitHub Desktop.
Nginx redirect www to non-www
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; | |
listen 443 ssl; | |
server_name www.example.com; | |
return 301 https://example.com$request_uri; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment