Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am trying to get an Apache webserver to load balance to a JBoss cluster, but unfortunately, I dont understand how mod_proxy_ajp works through the load balanced scenerio, since each of the 2 instances of JBoss run AJP on a different port. Since I specify my ProxyPass rule using only one of the ports, what ends up happening is that all the traffic goes through only one of the instances (that I specified using my ProxyPass rule).

<Location /jconsole>  
    # somehow I need this to also load balance to port AJP localhost:8209
    ProxyPass ajp://localhost:8109/jconsole
    ProxyPassReverse ajp://localhost:8109/jconsole

Any help I could get would be great.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

In this case you need to configure a balancer.

<Proxy balancer://mycluster>
  BalancerMember ajp://localhost:8109/jconsole
  BalancerMember ajp://localhost:8110/jconsole

<Location /jconsole>  
  ProxyPass balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On

More options can be found at the apache documentation at

share|improve this answer
Thanks very much. You might want to edit your answer though: the Proxy directive cannot be inside the Location directive. – djangofan May 4 '11 at 23:50
Change done as requested. – Decado May 5 '11 at 6:29

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.