Hi
I have been trying for the last three days to get this working. On a
clean Ubuntu install I followed all the instructions but I still can't
get nginx to work with passenger.
The problem is that when I try to access a rails page (for example
favorious.com/users) in my app I get this error from Nginx:
2009/11/20 13:59:14 [error] 13385#0: *7 open() "/var/www/testrails/
public/users" failed (2: No such file or directory), client:
93.97.5.9, server:
favorious.com, request: "GET /users HTTP/1.1",
host: "
favorious.com"
That says to me that nginx doesn't pass the request to rails and tries
to access a users directory within public.
When i run script/server, the testrails site works fine.
When I do ps aux I can see nginx and passenger loaded:
root 13372 0.0 0.3 5240 1760 pts/1 Sl 13:59 0:00
PassengerNginxH
root 13381 0.0 1.6 20932 8740 pts/1 S 13:59 0:00
Passenger spawn
root 13384 0.0 0.1 5404 688 ? Ss 13:59 0:00
nginx: master p
www-data 13385 0.0 0.2 5576 1356 ? S 13:59 0:00
nginx: worker p
www-data 13386 0.0 0.2 5576 1160 ? S 13:59 0:00
nginx: worker p
www-data 13387 0.0 0.2 5576 1140 ? S 13:59 0:00
nginx: worker p
The nginx conf looks like this:
user www-data;
worker_processes 3;
#error_log logs/error.log;
#error_log logs/error.log notice;
error_log /var/log/nginx/error.log info;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
passenger_root /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/
passenger-2.2.7;
passenger_ruby /opt/ruby-enterprise/bin/ruby;
include mime.types;
default_type application/octet-stream;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name
favorious.com;
passenger_enabled on;
location / {
root /var/www/testrails/public;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
Can anyone help with this? I have pretty much exhausted all the
internet resources I could find.
Thanks
George