Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I currently have the following network setup:

Router/Firewall > IIS Web Server

When a HTTP request comes through, IIS will look at the host header and decided which website to return.

My problem now is that I want to setup virtual machines on the web server to host linux based web servers. Are there a software layers that I can put between the router and the host virtual machine which will analyze HTTP request's and forward the request to another IP address based on the hostname? The final setup should look like:

Router/Firewall > Host VM > Hostname Redirect Software > VM Web Server

The software layer can be windows or linux based.

Please could you provide specific answers to this questions. Non answers include: Buying a new router, running apache on windows, changing my hosts file, buying more public IP addresses.

Thanks

share|improve this question
    
Are you looking for stackoverflow.com/questions/888325/… ? –  rems Mar 1 '11 at 12:11
    
@rems No, sorry. –  GateKiller Mar 1 '11 at 12:16

2 Answers 2

up vote 7 down vote accepted

It sounds like you want to setup a reverse proxy on the VM (or wherever). Then you will point all your domains to the reverse proxy which will then send the requests to their final destination. I linked to the Apache way of doing this, but nginx is also popular as a reverse proxy. Another option is any of the dedicated proxy software that will do this.

share|improve this answer
    
Could you give 1 example for both Linux and Windows? Thanks :) –  GateKiller Mar 1 '11 at 12:56
    
Here's an example for IIS that should help get you started. blogs.iis.net/carlosag/archive/2010/04/01/… –  matthew Mar 1 '11 at 16:33

my specific answer would be to setup a dns server which will do exactly that, it will return A records based on the host you enter which point your connection to the right Webserver IP address

Its all handled transparently through the workings of DNS

An example open source solutuion is Bind. you could easily create a vm to install this for your local network, your router may even already be able to do this depending on what it is.

Your server may already have a DNS server installed so it's probably just a matter of configuring it to work correctly

share|improve this answer
    
I'm not sure you fully understood the question. –  GateKiller Mar 1 '11 at 12:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.