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

We have two Apache server as front-end and 4 tomcat server as back-end configured using mod_proxy module as load balancer. Now, we want to exclude an single tomcat url from the mod_proxy load balancer. Is there any way or rule to exclude?

Proxy Balancer Setting:

<Proxy balancer://backend-cluster1>
   BalancerMember loadfactor=1 route=test1 retry=10
   BalancerMember loadfactor=1 route=test2 retry=10
share|improve this question

You exclude paths from mod_proxy with an exclamation mark (!) before your full ProxyPass statement, which your sample is missing - It would look something like ProxyPass /path balancer://backend-cluster1. Therefore, to exclude a path, add:

ProxyPass /my/excluded/path !


ProxyPass /my balancer://backend-cluster1
share|improve this answer
But the url to have access behind the proxyBalancer – Mughil Jun 26 '13 at 13:32
Hi @Mughil, please rephrase your comment. Thanks – Alastair McCormack Jun 26 '13 at 13:49
Thanks fuzzyfelt, I am asking how to exclude the url if we configured the proxy balancer. I have included the proxy configuration in the question – Mughil Jun 26 '13 at 14:29
See updated answer. Add an exclusion before you define which path to proxypass. – Alastair McCormack Jun 26 '13 at 15:03

You could put a rewrite above the proxy directives that will give users a 404 error when they try to access the url you want to exclude. You will need to enable rewrite_module.

<Location ~ ^/urltoblock($|/)>
   RewriteEngine On 
   RewriteRule .* - [L,R=404]
share|improve this answer
He didn't say anything about wanting a 404 error. – EJP Oct 2 '14 at 0:54

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.