[CentOS] httpd reverse proxy

Mon May 5 22:14:35 UTC 2008
Craig White <craig at tobyhouse.com>

On Mon, 2008-05-05 at 17:08 -0500, Les Mikesell wrote:
> Craig White wrote:
> > I am trying to figure this out and I always seem to have trouble
> > configuring apache to do more than basic stuff...
> > 
> > I have a web server that has several cnames assigned to it.
> > 
> > I want srv1.tobyhouse.com to be served by apache.
> > I want to proxy connections to www.tobyhouse.com to cms.tobyhouse.com
> > (different system)
> > 
> > If I do this...
> > 
> > <VirtualHost www.tobyhouse.com:*>
> >   ProxyPass / http://cms.tobyhouse.com
> >   ProxyPassReverse / http://cms.tobyhouse.com
> > </VirtualHost>
> > 
> > then I am good but it seemed to not pull the assets like css and
> > javascripts from cms.tobyhouse.com
> 
> That should work - but I'd put a trailing / on the target.  The files 
> that don't appear to work are probably cached in your browser or an 
> intermediate cache.  Check the logs to see if a request even came in. 
> You can get finer-grained control by using rewriterules with the P flag 
> but you shouldn't need it.  Just make sure the links from the backend 
> server are all relative and don't mention its real hostname.
----
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.

So it still is a problem

Craig