How to add exceptions to apache reverse proxy rules
- by Tania
I am trying to set a Apache reverse proxy so that requests get proxyed to another application running on 8080. However, I want some directories to be directly served rather than forwarded to proxy. What I want is:
http://localhost/ - http:// localhost:8080/myapp
http:// localhost/images - /var/www/html/images
http:// localhost/anything-else - http:// localhost:8080/myapp/anyhthing-else
My current httpd.conf is
ProxyRequests Off
ProxyTimeout 600
ProxyPreserveHost On
ProxyPass / http:// localhost:8080/
ProxyPassReverse / http:// localhost:8080/
RewriteEngine On
RewriteRule ^/(.*) http:// localhost:8080/VirtualHostBase/http/%{SERVER_NAME}:80/myapp/VirtualHostRoot/$1 [L,P]
What configuration should I do to make the local path exception to work?
Thank you, Tania