On 4/25/06, Sebastian Reitenbach <[EMAIL PROTECTED]> wrote:
> Hi,
>
> i have one public IP address available, and I want two http hosts behind this
> IP. With only one host, I would use virtual hosts, deciding on the used
> hostname which site to show the user as the answer.
>
> So with the firewall i cannot distinguish for source or destination IP
> address, as both can be for each host. So I have to redirect all incoming
> traffic to just one apache server. Is there a module available that will
> analyze the HOST information sent from the client to the server, and then
> redirect it to one or the other host?
> Or is there something built into apache that can handle this on its own or any
> other way?

You probably can do this with a rewrite:

RewriteEngine On
RewriteCond %{HTTP_HOST}   !^www\.domain2\.com [NC]
RewriteCond %{HTTP_HOST}   !^$
RewriteRule ^/(.*)         http://server2:/$1 [P]

This will proxy every request for www.domain2.com to the server named server2.


The other way is to have two virtual hosts on your first server, just
as if both your websites ran on the same machine, and have one of the
virtual servers proxy everything to the second server.

Krist

--
[EMAIL PROTECTED]
Solothurn, Switzerland

---------------------------------------------------------------------
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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to