[CentOS] httpd reverse proxy

Les Mikesell lesmikesell at gmail.com
Mon May 5 22:27:18 UTC 2008


Stephen Harris wrote:
> On Mon, May 05, 2008 at 03:14:35PM -0700, Craig White wrote:
>> On Mon, 2008-05-05 at 17:08 -0500, Les Mikesell wrote:
>>> Craig White wrote:
>>>> <VirtualHost www.tobyhouse.com:*>
>>>>   ProxyPass / http://cms.tobyhouse.com
>>>>   ProxyPassReverse / http://cms.tobyhouse.com
>>>> </VirtualHost>
>>> That should work - but I'd put a trailing / on the target.  The files 
> 
>> OK - well adding the backslash to the end seemed to fix the issue with
>> css but the problem is that stuff that is going to srv1.tobyhouse.com is
>> also proxied over to the same site and I want that to stay at home.
> 
> Try putting a "ServerName www.tobyhouse.com" entry into the VirtualHost
> config.

I missed that - the name in the VirtualHost directive will just be 
evaluated as an IP address.  To actually identify a named virtual host 
the ServerName must match what the client sends the the Host: header. 
ServerName can only have one entry.  If there are more names this host 
should accept you can have a ServerAlias entry with multiple names.  If 
none of your virtualhost entries have a match and you don't have an 
explict default, the first one is used.

-- 
   Les Mikesell
    lesmikesell at gmail.com





More information about the CentOS mailing list