Two webservers behind one public IP

New to mod_rewrite? This is a good place to start.

Two webservers behind one public IP

Postby dnkn » Mon Aug 18, 2003 11:08 am

I've only used mod_rewrite once and I've forgotten all that a knew about it.

My problem now is this:
I have two webservers behind a firewall running NAT. I only have one public IP, so I can't access both webservers from the outside. Only one can have access to port 80.

From what a remember, I'm wondering if mod_rewrite could take request send to one webserver, and pass them off to the second one.

For example:
Server1 hosts website1. The public URL is www.domain.com/website1
Server2 hosts website2. The public URL is www.domain.com/website2
Port 80 is forwarded to server1 so requests for website are not a problem. But when someone requests website2, apache rewrites to URL to be http://server2/website2 and thereby forward to request on to the appropriate webserver.

My question is, is this feasible? Is there a better, more obvious solution?
If it is possible and a good idea, how is it done?

Thanks,

Jacob Behm
dnkn
 
Posts: 1
Joined: Mon Aug 18, 2003 11:00 am

Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 37 guests

cron