Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Two physical servers one ip address

Status
Not open for further replies.

kaptlid

Technical User
Nov 26, 2006
86
US
I am not sure if this is even possible but will ask anyway.

I have two apache servers. One is version 1.3x the other is version 2 both running on windows. The two computers are behind a router and I only have one public ip address. I would like both servers to serve sites on port 80.

Can this be done? If yes, are there any things I should keep in mind to keep such a setup secure?

Thanks for your time.
 
It is possible but you would have to setup your own dns server. Your router can only send all http traffic to one ip address. It can't pick and choose based on the requested site.
 
So the dns server would be used to attach the local ip addresses (different servers) to the proper hostname?

What would be a good free dns server to use on winxp pro? Bind?
 
RhythmAce, I cannot envision how it would be possible using pure addressing. If a single IP of 444.333.222.111 is being used either internally or externally (routable or not) then requests for host.domain.tld will be returned an IP of 444.333.222.111 (real and answering) or anything else which will not be routed to the same machine.

The user perhaps hasn't considered that machines can answer to more than one IP, but that wasn't the question...

Sorry, RA, but I'm not sure I'm with you on this one...

D.E.R. Management - IT Project Management Consulting
 
Then I shall stand alone ;-) The hows and wherefors of what he wants to do are way, way beyond the scope of this forum and have nothing to do with apache. The fact that apache can listen for every ip address in the world wouldn't help him at all.

 
I am aware that one machine can answer to multiple ip's, but thats not the situation I have. If I had an extra ip I wouldn't be asking you guys this question.

Can my original question be setup without buying an expensive cisco switch or router?

Regards,
 
My first thought is that you need a third "device" answering all traffic on the public side of the network and then have it forward requests to the appropriate machine.

ASSUMPTION: There is no content overlap between the two web servers.

If this is so, you would probably use something like 'squid' as a content proxy.

Alternatively, you might be able to build something using Apache + mod_rewrite + mod_proxy.

The difficulty is that you need to have public-facing DNS all resolve to your one public IP, but you want different content servers to provide content from your private network based upon the URL/Domain.

This kind of content switching is complex.

May I ask why you aren't contemplating a consolidation of your web services onto a single box to answer the requests in a more traditional configuration?








D.E.R. Management - IT Project Management Consulting
 
There is no overlap between the servers. They require different versions of mysql and php to run thats why. If it was that easy I would have done so. :(
 
Your scripts can specify which version of those they want to use. You don't need two servers for that.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top