Why does Rails with Passenger/nginx only works in development mode? No logs available
Posted
by Michael W.
on Stack Overflow
See other posts from Stack Overflow
or by Michael W.
Published on 2010-03-11T12:09:07Z
Indexed on
2010/03/12
6:27 UTC
Read the original article
Hit count: 222
Hey folks,
I have a serious problem with one of our webservers... after having an internal alpha-testing with a mongrel/haproxy-cluster that worked well, we wanted to use nginx with passenger for our first production server (customers will access this server).
However, I can only run the rails app via development mode with passenger/nginx.
The app itself runs perfect with mongrel or webrick in production mode.
My biggest problem with this case is that I don't find ANY information in the nginx or rails-logs (only when I use mongrel or webrick).
Permissions are correct. Passenger-status shows that the app is running, but I always get the static 500.html-error page...
It would be so nice if you guys could give me a hint and help me solve the problem.
I put the config at the bottom of the post... This exact config works with rails_env development;
but I'd like to use the production mode ;-)
Thank you very much for your help!
Version: Ubuntu 8.04.2 64bit / nginx-0.7.64 (compiled and installed via passenger-2.2.11)
cat /opt/nginx/conf/nginx.conf
user www-data;
worker_processes 4;
error_log logs/error.log;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
passenger_root /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11;
passenger_ruby /usr/bin/ruby1.8;
passenger_log_level 3;
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
access_log logs/access.log;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name <<servername>>;
root /srv/app01/public;
passenger_enabled on;
}
© Stack Overflow or respective owner