Diverting web traffic between 2 web servers

tgabe213

2[H]4U
Joined
Aug 27, 2007
Messages
3,684
I have 2 servers. One is running my WHS, and another is my web server. How can I direct only certain requests to my WHS (those with the whs.homserver.com requests) and everything else to the other server?

Both of these servers are in Hyper-v VM's with Static IP's. My router is a WRT54G
 
So this is a home network with static IPs (like 192.*) on the inside but only one WAN IP?
 
Correct

Anything that can be done on the router side? Anything with DD-WRT (that I was thinking of installing)? Build a VM with whatever OS and send all web traffic that and use *something* to divert that around?
 
ISA Server? Is it a standalone install? Or is it built in to a Server 08 install?

I have a technet sub.
 
Well here's how DNS works.

whs.domain.com gets asked for what IP it goes to. Which is 123.123.123.123... So the request is sent to that IP.
web.domain.com get asks for what IP it goes to. Which is 123.123.123.123 as well, since you just have one WAN IP. So the traffic gets sent to that IP.

So both sets of traffic are headed to 123.123.123.123...

Maybe someone has some sort of a hack (I know in web design you can trick it using the URL) but as far as how DNS works I don't think it's possible.
 
That's how it works externally, but once it hits my network I want to determine what server it goes to.

There has to be a way that you can because hostheaders in IIS look to see what the request is pointing to. The only issue here is that they are on 2 servers and I can't port forward 80 to 2 servers.
 
If you have different external port numbers, you could do it; else, you'd need something intelligent enough to read the Layer7 HOST header and then route based upon that (aka, not something cheap enough for your house)
 
I plan on finishing setting up my DNS server and running everything in a domain.

Is there anything DNS can do? I saw something on another forum from searching about it, but the person who wrote the post is missing a lot of grammar, words, whatever else.
 
I don't know anything about IIS, but I assume there's a way to do this there.

Basically you can forward everything to one internal web server, and have that server act as a reverse proxy to the other one based on either the hostname (host-based virtual hosting) or just by the path. In Apache it looks like this:

Code:
ProxyPass /otherserver http://192.168.1.20/
ProxyPassReverse /otherserver http://192.168.1.20/
 
I don't know anything about IIS, but I assume there's a way to do this there.

Basically you can forward everything to one internal web server, and have that server act as a reverse proxy to the other one based on either the hostname (host-based virtual hosting) or just by the path. In Apache it looks like this:

Code:
ProxyPass /otherserver http://192.168.1.20/
ProxyPassReverse /otherserver http://192.168.1.20/

+1--Reverse proxy is what you need.
 
And it looks like ISA server will do it. I can utilize it's VPN functionality that I've been thinking about too.
 
Back
Top