Nginx as reverse proxy: How to display a custom error page for upstream errors, UNLESS the upstream says not to?
I have an Nginx instance running as a reverse proxy. When the upstream server does not respond, I send a custom error page for the 502 response code. When the upstream server sends an error page, that gets forwarded to…