Custom error_page

Friscia, Michael michael.friscia at yale.edu
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:
https://www.digitalocean.com/community/tutorials/how-to-configure-nginx-to-use-custom-error-pages-on-ubuntu-14-04

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
http://web.yale.edu<http://web.yale.edu/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20180514/c9a72c04/attachment.html>


More information about the nginx mailing list