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

Title is a bit confusing, so here's some background: I have a Tomcat server running on 8080 that needed to be secured. I configured Apache to terminate SSL and proxy to Tomcat, like so (which I think I did correctly):

ProxyRequests       off
ProxyPreserveHost   on
ProxyPass           /jira   http://localhost:8080/jira
ProxyPassReverse    /jira   http://localhost:8080/jira

<VirtualHost _default_:443>
    SSLEngine on

    ProxyPass           /   http://localhost:8080/
    ProxyPassReverse    /   http://localhost:8080/

This worked as expected, except now I want to secure other directories in my web server, for example a Mercurial repository. When I create said Directory and require SSL, the request gets forwarded to Tomcat (just like I told it to...which in this case is not what I want).

So my question is this: how do I change my configuration so I can only forward certain requests to the Tomcat server?

Updated solution per Shane's response:

<VirtualHost _default_:443>
    SSLEngine on

    ProxyPass / !
    ProxyPass           /jira   http://localhost:8080/jira
    ProxyPassReverse    /jira   http://localhost:8080/jira

Made sense to do it this way, since then I'm only proxying the applications I need to.

share|improve this question
up vote 1 down vote accepted

Use ProxyPass exemptions before your existing configs to avoid proxying certain locations:

ProxyPass /location/to/not/proxy !
ProxyPass /other/location/to/not/proxy !
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
share|improve this answer
Thanks, this pointed me in the right direction. – heyseuss Oct 20 '11 at 18:34

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.