Return Specific Error Page in NGinX when all the upstream servers are marked down

shivramg94 nginx-forum at
Fri May 5 08:59:57 UTC 2017

I have an upstream block as follows

upstream sample{
    server down;
    server down;

Currently I get a 502 error. In this special case where I receive a 502 and
all upstream servers are down I would like a receive a specific error page
as temporarily unavailable.

How can i achieve that?

Posted at Nginx Forum:,274075,274075#msg-274075

More information about the nginx mailing list