Question: I have set up **nginx + REE + passenger** on my Linode VPS, which has been running great for past six month, both for Rails 2.3.x and Sinatra applications.

However this week I tried to add Rails 3 application to the stack, and I keep on getting `404 Not Found`. Logs show that nginx doesn't recognize Rails application and is trying to serve it as static.

```
2010/11/29 23:44:44 [error] 12464#0: *29 "/var/app/modelky/public/index.html"
is not found (2: No such file or directory), client: 90.177.23.122, server:
reedink.com, request: "GET / HTTP/1.1", host: "reedink.com"

2010/11/29 23:44:44 [error] 12464#0: *30 open() "/var/app/modelky/public/favicon.ico" 
failed (2: No such file or directory), client: 90.177.23.122, 
server: reedink.com, request: "GET /favicon.ico HTTP/1.1", host: "reedink.com"

```

However, I'm using the same configuration as I use for all my other Rails 2.3.5 and Sinatra applications that works without any problems

```
server {
    listen 80;
    server_name www.reedink.com;
    rewrite ^(.*) http://reedink.com$1 permanent;
}

server {
    listen 80;
    server_name reedink.com;
    root /var/app/modelky/public;
    passenger_enabled on;
}

```

From what I understand, Rails 3 should be rack compatible, so from the server's point of view, it's no different than any Sinatra application right?

Answer: 
I just built out a rail 3 box on linode this weekend. I started w/ this stackscript

<http://www.linode.com/stackscripts/view/?StackScriptID=1288>

and then went from there.

here's a copy of my server conf from the nginx.conf

```
server {
  listen 80;
  server_name localhost;
  root /home/deploy/foo.bar.com/current/public;
  passenger_enabled on;
}

```

i'd also try adding a static index.html file, get nginx working properly and then try and bootstrap the rails app.
Looks like your request is not hitting Rails. I would try to:

* put a static index.html in `/var/app/modelky/public` to see if it shows up
* check if the Rails app is in the given path and restart nginx
* prestart Passenger on that server and see how it reacts

To prestart Passenger:

```
http {
  server {
    listen 80;
    server_name www.reedink.com;
    rewrite ^(.*) http://reedink.com$1 permanent;
  }

  server {
    listen 80;
    server_name reedink.com;
    root /var/app/modelky/public;
    passenger_enabled on;
  }
passenger_pre_start http://reedink.com/;
}

```