httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen Boyle <...@bourse.ch>
Subject Re: Drop port and hide multiple servers behind one fixed address?
Date Fri, 30 Nov 2001 08:58:59 GMT
Matthew Hook wrote:
> 
> Thanks Joshua,
> 
> I've just had a look through the name based virtual
> hosting and I'm not certain this is what I want or not.
> 
> To simplify things a bit what I want is the
> following.  Lets say I have two physical servers
> behind a firewall.  On the first is apache.
> On the second is MS IIS.  They are accessable
> using the following URL's
> 
> http://www.domain
> http://www.otherdomain:8001
> 
> Server one has an IP Address of 192.168.2.1
> Server two has an IP address of 192.168.2.2
> 
> These reside behind a firewall in a DMZ.
> The address of the firewall is 10.10.10.10
> 
> The redirection currently looks like this:
> 10.10.10.10:80 -> 192.168.2.1:80
> 10.10.10.10:8001 -> 192.168.2.2:80
> 
> What I'd like to be able to do is allow someone
> who points their browser to http://www.otherdomain
> to not reach www.domain but www.otherdomain
> At the moment you have to specify www.otherdomain:8001 to reach the other domain.
> 
> How would I configure apache to do this?
> Can I do it without the current port redirection?

Are you saying that "www.domain" and "www.otherdomain" are external and
both resolve to 10.10.10.10? 

If so, the only way to distinguish them is by the "Host:" header
information. Rather than rewriting, you need to run an instance of
apache as a Proxy on the FW (10.10.10.10). I've not used mod_proxy
myself, but it seems quite easy - you'd set up two virtualhosts on the
proxy-server and use the ProxyPass directive. Something like:

NameVirtualhost 10.10.10.10:80
<VirtualHost 10.10.10.10:80>
  ServerName www.domain
  ProxyPass  /   http://192.168.2.1:80/
</VirtualHost>
<VirtualHost 10.10.10.10:80>
  ServerName www.otherdomain
  ProxyPass  /   http://192.168.2.2:80/
</VirtualHost>

Check the mod_proxy docs for details. Anyone else care to comment if
this is right?

Rgds,

Owen Boyle.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message