Welcome! Log In Create A New Profile

Advanced

Re: Configure specific upstream node to spit 30x error

Maxim Dounin
August 15, 2012 04:14PM
Hello!

On Wed, Aug 15, 2012 at 02:52:09PM -0400, TECK wrote:

> Hi all,
>
> I was wondering if there is feasible way to have a node spit a specific 30x
> error (i.e. 307) if it becomes unreachable, instead of passing to next
> upstream node?
>
> upstream mycluster {
> server 192.168.1.2;
> server 192.168.1.3;
> server 192.168.1.4;
> }
>
> If node 192.168.1.3 is down, it should return a 307, instead of passing to
> 192.168.1.4.

Something like this should work:

error_page 502 504 =307 http://example.com/;
proxy_next_upstream off;

See here for details:

http://nginx.org/r/error_page
http://nginx.org/r/proxy_next_upstream

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Configure specific upstream node to spit 30x error

TECK August 15, 2012 02:52PM

Re: Configure specific upstream node to spit 30x error

TECK August 15, 2012 03:21PM

Re: Configure specific upstream node to spit 30x error

Maxim Dounin August 15, 2012 04:14PM

Re: Configure specific upstream node to spit 30x error

TECK August 15, 2012 05:12PM

Re: Configure specific upstream node to spit 30x error

Maxim Dounin August 15, 2012 05:32PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 92
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready