Forum: NGINX error_page problem - 50x.html

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
E884d559ed311e48ec9831b895719b2a?d=identicon&s=25 Yanni Mac (yannimac)
on 2009-02-12 18:01
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?
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-02-12 18:17
(Received via mailing list)
On Thu, Feb 12, 2009 at 06:01:51PM +0100, Yanni Mac wrote:

> 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?

http://wiki.codemongers.com/NginxHttpProxyModule#p...
This topic is locked and can not be replied to.