error_page problem - 50x.html

Yanni Mac lists at ruby-forum.com
Thu Feb 12 20:01:51 MSK 2009


I have the following Nginx config:

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /my_rails_app/public;
    }

I am using mongrel cluster behind Nginx to serve my rails app and
everything works fine, but if I get an application error, I get a
generic error message instead of my 50x.html page.  I am assuming this
error would be a 500 error - I get this error in my mongrel app log:

NoMethodError (undefined method `include?' for nil:NilClass):

I can see the page if I go to it directly using URL=
http://myapp.com/50x.html.  I was expecting Nginx to serve the 50x.html
page instead of displaying the generic message: Application error
(Rails)

Any idea what I am doing wrong?  Could there be some miscommunication
between mongrel and Nginx?
-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list