error_page problem - 50x.html

Igor Sysoev is at rambler-co.ru
Thu Feb 12 20:03:27 MSK 2009


On Thu, Feb 12, 2009 at 06:01:51PM +0100, Yanni Mac wrote:

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

http://wiki.codemongers.com/NginxHttpProxyModule#proxy_intercept_errors


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list