Re: redirecting when behind a firewall

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 10, 2008 at 20:47, bruce <bedouglas@xxxxxxxxxxxxx> wrote:

> So i don't have the ability to do something like "forward foo.gotdns.com to
> machine1, and forward foo2.gotdns.com to machine2" which is exactly what i'm
> trying to accomplish!!
>
> I've been looking into using vhosts, and the redirect functionaility, but I
> can't seem to get it to work, using the external domain name.

You can't do this with redirect. Redirect basically tells a browser
"what you are looking here isn't here, but there on this other host",
and then the browser will start a new request to the host. So you can
only do redirects to hosts the client can see. As the client can see
only one host behind your firewall this doesn't work.

However, you can achieve what you want in a different way, through
"reverse proxying".

You configure your firewall to redirect all port 80 traffic to one
machine, and on that machine you have two virtual hosts:

NameVirtualHost *:80
<VirtualHost *:80>
Servername foo.gotdns.com
ProxyPass / http://machine1/
ProxyPassReverse / http://machine1/
</VirtualHost>

<VirtualHost *:80>
Servername foo2.gotdns.com
ProxyPass / http://machine2/
ProxyPassReverse / http://machine2/
</VirtualHost>

Krist

-- 
krist.vanbesien@xxxxxxxxx
krist@xxxxxxxxxxxxx
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux