I have a shared hosting server with some 2000 websites on it.
I have a lightweight apache/event frontend that takes care of static content and locally proxies requests for dynamic content to a heavyweight apache/prefork/mod_php backend.
This is the regex I am using at the moment
ProxyPassMatch .*\.(?i)(avi|bmp|css|flv|gho|gif|ico|iso|jpg|jpeg|js|mkv|mp4|pdf|png|rar|swf|tiff|txt|zip)$ !
ProxyPassReverse / http://%{HTTP_HOST}:8080/
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8080/
However I am considering switching to this regex
(\.php|\/|\.html|^[^.]+|\.htm)$
This would proxy the following
1) anything.php
2) / or /anything/
3) anything.html
4) anything
5) anything.htm
but not the following
1) anything.PHP
2) anything.jpg
3) anything.anything
which is exactly what I want.
Can you come up with a more efficient solution to proxy anything that should be treated as dynamic content?