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

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/* ?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

Add before the first ProxyPass:

ProxyPass /site/IMAGES/ !

See the mod_proxy docs for the full details.

share|improve this answer

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:

<VirtualHost *:80>
  ...
  <Location /site>
    ProxyPass        http://server.local:8989/site
    ProxyPassReverse http://server.local:8989/site
  </Location>
  <Location /site/IMAGES>
    ProxyPass "!"
  </Location>
</VirtualHost>

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!

share|improve this answer

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.