Hello all,

I'd like to have nginx+passenger show the custom (Default) error pages when 
a HTTP 500 error occurs in my app.

I am running a rails 2.3 app on nginx 1.2 with passenger 3.0.7

Here is my nginx config file:

#user  nobody;
worker_processes  16;


error_log  /opt/nginx/logs/error.log  info;


pid        /opt/nginx/logs/nginx.pid;
worker_rlimit_nofile 32768;


events {
    worker_connections  2048;
}




http {
    passenger_root /usr/lib/ruby/gems/1.8/gems/passenger-3.0.7;
    passenger_ruby /usr/bin/ruby;


    include       mime.types;
    default_type  application/octet-stream;


    #access_log  /opt/nginx/logs/access.log  main;


    sendfile        on;
    #tcp_nopush     on;


    server {
        listen 80;
        server_name localhost;
        root /var/www/dashboard/current/public;
        passenger_enabled on;
        passenger_min_instances 1;
#       listen 443;
#       ssl on;
#       ssl_certificate /opt/nginx/conf/server.crt;
#       ssl_certificate_key /opt/nginx/conf/server.key;


        # Rails error pages
        error_page 500 502 503 504 /500.html;
        location = /500.html {
            root /var/www/dashboard/current/public;
        }
    }
}


In my dev env, app running on webrick, when the app generate a http 500 
error I get the custom error page just fine.Any idea why the difference?

Thanks

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/f33c472b-64f7-46a3-83e1-4663d10821a4%40googlegroups.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to