Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running Apache 2.2 on FreeBSD. As of late I've been looking at Cherokee + uWSGI for some Django/Python.

I want to keep Apache 2.2 at the front (port 80 replies) and proxy connections to my Cherokee server running at the same machine.

My problem is that I've got some legacy stuff for a few dir locations on my URL.

I want / to go to my Cherokee (reverse proxy) but keep Apache for /dir1/ and /dir2/.

I got the reverse proxy working fine with mod_proxy.

ProxyRequests            Off
<Location />

Cherokee is running at port 8080 on localhost.

The problem is that I can't figure out how to turn off the reverse proxy for /dir1/ and /dir2/ so that Apache process the incoming requests to the dirs.

Is it possible to add Location directives for /dir1/ and /dir2/ to tell Apache not to reverse proxy the dirs?

share|improve this question
up vote 4 down vote accepted

From reading ProxyPass's doc, You should do something like that :

ProxyPass                /dir1/ !
ProxyPass                /dir2/ !
ProxyPass                /
ProxyPassReverse         /
share|improve this answer
Thank you very much, exactly what I was looking for. The final solution was to move the ProxyPass + ProxyPassReverse outside <Location> and move /dir1/ and /dir2/ ! before the ProxyPass in order to catch it before the / ProxyPass – Daniel Johansson Feb 15 '10 at 16:38
I've edited the answer to reflect that. – mat Feb 15 '10 at 16:39
This is extremely useful as LocationMatch directives will not work with ProxyPass correctly. – Lucas Holt Apr 18 '13 at 17:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.