HOW TO : Enable global reverse proxy with certain exclusions in Apache

Say you want to enable reverse proxy on a site powered by Apache Web Server where all traffic to the web site it reverse proxied to a different server, but you want to exclude certain paths from being reverse proxies. I don’t know why you would want to do that :).. but we ran into that scenario at work and I wanted to document the config for future reference. The picture below shows a high level view of the traffic

  • Ensure the following modules are being loaded in Apache.


LoadModule proxy_module modules/
LoadModule proxy_balancer_module modules/
LoadModule proxy_connect_module modules/
LoadModule proxy_ftp_module modules/
LoadModule proxy_http_module modules/
LoadModule rewrite_module modules/


  • In the virtual host configuration for add the following lines


ProxyRequests Off

<Proxy *>
Order deny,allow
Allow from all

ProxyPass /static !
ProxyPass /media !
ProxyPass / http://INTERNAL_SERVER:8888
ProxyPassReverse / http://INTERNAL_SERVER:8888


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.