Ubuntu 9.05 + Nginx + REE + Passenger

3 views
Skip to first unread message

georgios

unread,
Nov 20, 2009, 9:27:48 AM11/20/09
to Phusion Passenger Discussions
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

Hongli Lai

unread,
Nov 23, 2009, 8:35:21 AM11/23/09
to phusion-...@googlegroups.com
You must re-specify 'passenger_enabled' in every 'location' block.
> --
>
> You received this message because you are subscribed to the Google Groups "Phusion Passenger Discussions" group.
> To post to this group, send email to phusion-...@googlegroups.com.
> To unsubscribe from this group, send email to phusion-passen...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/phusion-passenger?hl=.
>
>
>



--
Phusion | The Computer Science Company

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)

georgios

unread,
Nov 26, 2009, 4:46:01 PM11/26/09
to Phusion Passenger Discussions
Thanks. that worked!
> > For more options, visit this group athttp://groups.google.com/group/phusion-passenger?hl=.
>
> --
> Phusion | The Computer Science Company
>
> Web:http://www.phusion.nl/
> E-mail: i...@phusion.nl
Reply all
Reply to author
Forward
0 new messages