[CentOS] httpd reverse proxy

Tue May 6 04:49:11 UTC 2008
Les Mikesell <lesmikesell at gmail.com>

Craig White wrote:
> On Tue, 2008-05-06 at 01:31 +0200, Kai Schaetzl wrote:
>> Craig White wrote on Mon, 05 May 2008 14:57:05 -0700:
>>
>>> <VirtualHost www.tobyhouse.com:*>
>> this is very old-fashioned and unreliable syntax, use this instead:
>> http://httpd.apache.org/docs/2.2/vhosts/name-based.html
> ----
> that's what I ended up doing...you took the first message in the thread
> ----
>>>   RedirectPermanent / http://cms.tobyhouse.com
>>> It sent ALL traffic over to the other server which is clearly not what I
>>> want.
>> I don't understand. Isn't that exactly what you want, redirect all traffic 
>> for www.tobyhouse.com to cms.tobyhouse.com?
>>
>>> How can handle this? Must I give a unique ip address to
>>> www.tobyhouse.com?
>> Ah, you have several virtual hosts on it and all of them get redirected to 
>> cms.tobyhouse.com? That's the result of the wrong virtual host syntax you 
>> use. Use name-based virtual hosts and it will work.
>>
>> Why don't you solve this at dns level? Wouldn't that be much "cleaner"?
> ----
> sure - but I needed a way to do this temporarily to demonstrate to
> bosses who don't always understand these technical issues and to figure
> out if and how I handle things at the DNS level.

Its actually very useful to access backend hosts on private networks or 
to transparently spread the load across several machines.

-- 
   Les Mikesell
    lesmikesell at gmail.com