Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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/
</VirtualHost>

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
</VirtualHost>

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

share|improve this question

1 Answer 1

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

 
discard

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.