intercepted 400 errors not displaying custom error page

Jamie W. lists at ruby-forum.com
Fri Sep 30 20:13:02 UTC 2011


I am trying to intercept errors from a Unicorn proxy_pass and display a
custom 40x error page that is located on disk. This is what a subscript
of my config:

proxy_intercept_errors on;
error_page 400 403 =404 /404.html;
location /404.html {
  allow all;
  internal;
}

When I receive a 403 error from NGINX it is passing to the location and
rendering the 404.html error page in my root. When the upstream returns
a 400 response NGINX is intercepting it but not rendering the 404.html
file, instead it returns the generic NGINX 400 error response page.

Thank you in advance!

-- 
Posted via http://www.ruby-forum.com/.



More information about the nginx mailing list