Using Apache to (almost) bypass Apache?
September 14, 2008 12:18 PM
Subscribe
Is there a simple way to use Apache's
ProxyPass directive so that everything
apart from a directory beneath the webroot gets passed on to another server? If not, can it be done another way?
I'm wanting to combine lighttpd with Apache to take some load of a server, but unlike the standard ProxyPass setup, I'd like the httpd.conf to direct things like this:
http://mysite.com/ -> lighttpd running on port 81
http://mysite.com/foo/ -> Apache running on port 80
Is that possible with ProxyPass? If not, can it be done another way, perhaps by swapping the ports and putting it in the lighttpd config?
posted by holgate to computers & internet (3 comments total)
1 user marked this as a favorite
The ! directive is useful in situations where you don't want to reverse-proxy a subdirectory, e.g.
ProxyPass /mirror/foo/i !
ProxyPass /mirror/foo http://backend.example.com
will proxy all requests to /mirror/foo to backend.example.com except requests made to /mirror/foo/i.
posted by sbutler at 12:32 PM on September 14, 2008