Route multiple subdomains on one external ip to multiple internal ips

Posted by Abenil on Server Fault See other posts from Server Fault or by Abenil
Published on 2012-03-27T10:00:35Z Indexed on 2012/03/27 11:31 UTC
Read the original article Hit count: 251

i have several subdomains(git.example.org, build.example.org, etc.), i have a router with an external ip and i have several virtual machines on a host computer with internal ips. Now i want to route git.example.org to internal ip 10.0.2.1 and build.example.org to internal ip 10.0.2.2. How can I do this?

I setup in the Router that all traffic on port 80 is comming to my host computer with internal ip 10.0.2.3 and installed Squid on that computer.

I added the following lines to the squid.conf file:

cache_peer 10.0.2.1 parent 80 0 no-query originserver name=server_1
cache_peer_domain server_1 git.example.org
cache_peer 10.0.2.2 parent 80 0 no-query originserver name=server_2
cache_peer_domain server_2 build.example.org

But this is not working for me. :( Any help appreciated.

Regards Nils

Update: Here is the solution for Apache

http://serverfault.com/a/273693

© Server Fault or respective owner

Related posts about virtualization

Related posts about subdomain