How can I reroute a sub-domain to localhost + port number?

Posted by urig on Server Fault See other posts from Server Fault or by urig
Published on 2011-06-24T06:43:20Z Indexed on 2011/06/24 8:24 UTC
Read the original article Hit count: 240

Filed under:
|
|

I have several web applications running on my developer machine. They mimic our production web applications which are hosted on sub-domain. For example, consider:

api.myserver.com - is mimicked by 127.0.0.1:8000     
www.myserver.com - is mimicked by 127.0.0.1:8008    
and so on...

How can I make it so that, on my Windows 7 machine, HTTP calls to "api.myserver.com" (note the lack of port number) are redirected to 127.0.0.1:8000 etc? Note that this needs to apply both to client-side calls (in the browser) and server-side calls (from IIS to Python development server and vice versa).

Do I need a proxy to run locally to achieve this? Can you recommend such a tool?

© Server Fault or respective owner

Related posts about proxy

Related posts about routing