Created
May 5, 2014 19:22
-
-
Save wlaurance/ca642fe33093b1a58b05 to your computer and use it in GitHub Desktop.
Nginx server snippet
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{ | |
server_name examplehost1.com; | |
rewrite ^/(.*) http://www.examplehost1.com permanent; | |
} | |
server{ | |
server_name blog.examplehost1.com; | |
rewrite ^/(.*) http://www.examplehost1.com permanent; | |
} | |
server{ | |
server_name www.examplehost1.com; | |
location / { | |
proxy_pass http://127.0.0.1:3000; | |
} | |
} | |
server{ | |
server_name www.examplehost2.com; | |
location / { | |
proxy_pass http://127.0.0.1:3001; | |
} | |
} | |
server{ | |
server_name examplehost2.com; | |
rewrite ^/(.*) http://www.examplehost2.com permanent; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment