I am using rails 3.0.7 and I have apache2 + unicorn installed in the production environment.
I have my .conf
file as follows
<VirtualHost *:80>
ServerName something.com
# Point this to your public folder of teambox
DocumentRoot /pal/public
RewriteEngine On
<Proxy balancer://unicornservers>
BalancerMember http://127.0.0.1:5000
</Proxy>
# Redirect all non-static requests to unicorn
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://unicornservers%{REQUEST_URI} [P,QSA,L]
ProxyPass / balancer://unicornservers/
ProxyPassReverse / balancer://unicornservers/
ProxyPreserveHost on
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
Tried RewriteCond %{REQUEST_FILENAME} !-f
But it seems that apache is not serving the static requests ( the files in the public directory). All the static requests also comes to rails. What configuration am I missing ?