I'm trying to configure a vhost to work with a proxy, but only if the request is not for a static file -- in which case I'd like Apache to serve it. Here's what I'm using:
<VirtualHost *:80> ServerName app.local DocumentRoot "/app/static" # Serve static files <Directory "/app/static"> Require all granted Options Indexes FollowSymLinks AllowOverride None </Directory> RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^/(.*) http://localhost:8000/$1 [P,L,QSA] ProxyPreserveHost On ProxyPass / http://localhost:8000/ ProxyPassReverse / http://localhost:8000/ </VirtualHost> Yet, if I try to get app.local/style.css then this request is still proxied (I see it in the proxy server log) despite the file /app/static/style.css existing. How can I make it serve these files?