How can I configure Nginx to forward www.myserver.com/XYZ to different servers depending on XYZ?
-
Suppose I have multiple different Tornado servers on my machine. I would like them to be called depending on the URL. How can I configure Nginx to do this? E.g., I have servers A on localhost:8000 and B on localhost:9000. I would like A to handle requests to http://www.myserver.com/A and B to handle requests to http://www.myserver.com/B
-
Answer:
location /A { proxy_pass http://localhost:8000; } location /B { proxy_pass http://localhost:9000; }
Bob Poekert at Quora Visit the source
Related Q & A:
- How can I redirect www to non www site?Best solution by Server Fault
- How can I do nginx rewrite?Best solution by Server Fault
- How can I configure Outlook Express or Microsoft Express with yahoo mail?Best solution by Yahoo! Answers
- How can I configure my Outlook Express with Yahoo mail?Best solution by Yahoo! Answers
- How can I configure my yahoo mail to Outlook Express?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.