On 12/13/06, Xavier Noria <fxn@xxxxxxxxxxx> wrote:
I am using mod_proxy_balancer to balance Mongrels in localhost. I am putting lines like ProxyPass /images/ ! to let Apache serve static files, but that couples the config with the application layout. I would prefer to be able to simply say: if file exists let Apache send it otherwise ProxyPass to Mongrel ProxyPassReverse end Is that possible?
Yes, with mod_rewrite. Something like RewriteEngine On RewriteCond /your/docroot/%{REQUEST_FILENAME} !-f RewriteRule ^(.+) http://mongrel/$1 [P,L] ProxyPassReverse / http://mongrel/ Use the RewriteLog to debug. But I wouldn't really recommend this. It can be a fragile configuration, and it will require local filesystem access on every request, which will be slow for a busy server. Joshua. --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx