Last active
August 29, 2015 14:11
-
-
Save aaira-a/514e4829235d4a886a1a to your computer and use it in GitHub Desktop.
redirect subdomains to different ports in nginx
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 sub1.domain.com; | |
location / { | |
proxy_pass http://localhost:8008; | |
} | |
} | |
server { | |
listen 80; | |
server_name sub2.domain.com; | |
location / { | |
proxy_pass http://localhost:8009; | |
} | |
location /static2 { | |
autoindex on; | |
alias /path/to/static/folder; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment