Created
November 27, 2017 15:35
-
-
Save omerh/3bdfec7cb045b1a2e323344845df8014 to your computer and use it in GitHub Desktop.
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 domain.com; | |
return 301 http://www.domain.com$request_uri; | |
} | |
server { | |
listen 80; | |
server_name *.domain.com; | |
location / { | |
root /usr/share/nginx/html; | |
index index.html index.htm; | |
} | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root /usr/share/nginx/html; | |
} | |
} | |
server { | |
listen 80 default_server; | |
location / { | |
return 403; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment