How to Exclude an URL for Apache Mod_proxy?

Solution 1:

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 !

before

ProxyPass /my balancer://backend-cluster1

Solution 2:

In addition to Alastair McCormack answer: If you use <Location>, you need to put the exception below instead of before:

<Location /my/>
    ProxyPass balancer://backend-cluster1
</Location>

<Location /my/excluded/path/>
    ProxyPass !
</Location>