How to add exceptions to apache reverse proxy rules
Posted
by Tania
on Server Fault
See other posts from Server Fault
or by Tania
Published on 2009-10-31T10:35:40Z
Indexed on
2010/04/13
17:03 UTC
Read the original article
Hit count: 418
apache2
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
© Server Fault or respective owner