static files and 404

Marcelo Barbudas nostef at
Thu Mar 19 21:14:40 MSK 2009


I have a setup where I am using nginx with RubyOnRails.

The setup looks simple:
if (!-f $request_filename) {
  proxy_pass http://domain1;

However I have a directory that holds images that sometimes get deleted.
People keep linking to those images and the 404s go to the rails process.

How can I tell nginx that any request towards:
should never be forwarded to rails?


More information about the nginx mailing list