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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

rnburn
I have an upstream block as follows

upstream sample{
    server abc1.example.com down;
    server abd2.example.com 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: https://forum.nginx.org/read.php?2,274075,274075#msg-274075

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

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

Aleksandar Lazic
Hi shivramg94.

shivramg94 written on Fri, 05 May 2017 04:59:57 -0400:

> I have an upstream block as follows
>
> upstream sample{
>     server abc1.example.com down;
>     server abd2.example.com down;
> }
>
> Currently I get a   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?

http://nginx.org/en/docs/http/ngx_http_core_module.html#error_page

error_page 502 "specific error page"

Hth
Aleks

> Posted at Nginx Forum:
> https://forum.nginx.org/read.php?2,274075,274075#msg-274075
>
> _______________________________________________
> nginx mailing list
> [hidden email]
> http://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx