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 have a question about proxy and ajp module.

On my machine I have a Apache web server and a Tomcat servlet container.

On Tomcat is running a my java webapplication.

On Apache I have some services and I can call these in this way:


I would configurate a ajp connector to call my tomcat webapplication from Apache. I would somethin as http://myhost to call the Tomcat webapp.

So, I configurated my apache in this way..and I have what I wanted: I can use http://myHost to visualize the Tomcat webApp by Apache.

<VirtualHost *:80>

    ProxyRequests off
    ProxyPreserveHost On

    ServerAlias myserveralias
    ErrorLog logs/error.log
    CustomLog logs/access.log common

    <Proxy *>
      Order deny,allow
      Allow from all

     ProxyPass /server-status !
     ProxyPass /balancer-manager !

    ProxyPass / balancer://mycluster/ stickysession=JSESSIONID nofailover=Off maxattempts=1

    <Proxy balancer://mycluster>
       BalancerMember ajp://myIp:8009  min=10 max=100 route=portale loadfactor=1
       ProxySet lbmethod=bytraffic

    <Location /balancer-manager>
        SetHandler balancer-manager
        Order deny,allow
        Allow from localhost

    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    LogFormat "%{Referer}i -> %U" referer
    LogFormat "%{User-agent}i" agent


But, now I can't use the apache services:

If I use http://myhos/service1 I have an error because apache try to search service1 on my tomcatWebApp.

Is there a way to fix it?

share|improve this question
up vote 3 down vote accepted

You can prevent your Apache services from being proxied to Tomcat by using the ! exclusion syntax, just like you're already doing for server-status and balancer-manager:

ProxyPass /service1 !
ProxyPass /service2 !
ProxyPass /service3 !
share|improve this answer

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.