I have apache with one folder used for reverse proxy:
<VirtualHost *:80>
...
ProxyPass /site http://server.local:8989/site
ProxyPassReverse /site http://server.local:8989/site
</VirtualHost *:80>
How can I disable proxy for url's /site/IMAGES/* ?
Add before the first
ProxyPass
:See the mod_proxy docs for the full details.
It wouldn't have been available at the time you asked this question, but if you're using Apache HTTPD 2.4 or later, then as described in the docs you could do it with two location blocks:
Location blocks are interpreted in order, so you need to put the no-proxy one after the proxy one. Alternately, if you want to keep the proxy directives at the vhost level, the answer given by fission works just fine!
This wasn't enough for my situation.
ProxyPass /site/IMAGES/ !
I wanted to exclude some paths and not only one like that case, I searched online and all are talking about t=something like this,
ProxyPass /site/IMAGES/ !
This only valid when you want to exclude only one path, works great! but I wanted to exclude some paths and not only one, so I tried to do it like this,
ProxyPass /site/IMAGES/ !
ProxyPass /site-web/ !
Not working also, it's valid to bypass only one path at a time. So Thanks Gagravarr, I could do what I need using Location with Apache and I could ProxyPass exclude some paths like,
<Location "/admin"> ProxyPass "!" </Location> <Location "/mail"> ProxyPass "!" </Location> <Location "/html"> ProxyPass "!" </Location> <Location "/shared"> ProxyPass "!" </Location> ProxyPreserveHost On ProxyPass / http://193.168.1.3/ ProxyPassReverse / http://192.168.1.3/
I think this may help somebody on my situation.