Custom error_page

Friscia, Michael michael.friscia at
Mon May 14 17:26:19 UTC 2018

I’m not sure if I’m using error_page correctly. I’m trying to set this up so that if the upstream server returns a 500, then I show a custom error page. Is this possible? I have a custom error setup that works just fine using the instructions from this site:

That all works just fine, but it seems to only work for cases when Nginx is handling it and not when the upstream server is serving an error.

Simply put, how can I have Nginx serve a custom error page when the upstream server returns a 500, 502, 503, 504 or 404?

Michael Friscia
Office of Communications
Yale School of Medicine
(203) 737-7932 - office
(203) 931-5381 - mobile<>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list