Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have no index.html file in my public folder. My rails routes file routes this, and it works fine when I run 'rails server' on my machine.

I'm trying to deploy the app. I have passenger and nginx running When I run rails server on my local machine, it works fine. But it's just trying to access static file when I try to access it on the production server.

Here's my nginx conf:

worker_processes  1;
#pid        logs/;
events {
    worker_connections  1024;
http {
    passenger_root /usr/lib/ruby/gems/1.9.1/gems/passenger-3.0.2;
    passenger_ruby /usr/bin/ruby;
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    server {
        listen       80;
        root /www/mmjs/public;
        access_log  logs/host.access.log;
        passenger_enabled on;

Thank you for any help. I really appreciate it.

share|improve this question

Have you found out what your problem was?

I actually run into the same problem, and of course it was all my fault: I'm using capistrano to deploy my app, and just forgot that it sits in the "current" directory. So instead of

root /var/www/myapp/public;

the app was actually in

root /var/www/myapp/current/public;

Hope this helps.

Rgds, Rollo

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.