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 answers total) 1 user marked this as a favorite
 
Best answer: Documentation has an example of exactly what you want to do:

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


Response by poster: Heh. Read the docs, and couldn't see for looking. Thanks.
posted by holgate at 1:07 PM on September 14, 2008


n/p. We all have those moments.
posted by sbutler at 1:18 PM on September 14, 2008


« Older How can I keep my apartment free of cat fur?   |   Finding a poem Newer »
This thread is closed to new comments.