HTTP proxy directives

proxy_next_upstream_tries directive (HTTP proxy)

HTTP, server, location contexts. Since 1.7.5; default 0 disables this count bound. Positive value caps total upstream attempts including the first.

Formal Syntax & Structure

nginx syntaxnginx
proxy_next_upstream_tries number;

Parameters & Attributes

NameTypeDescription
numbernonnegative integerPositive limit includes first attempt; zero removes this particular bound.

Working Example

Example Snippetnginx
proxy_next_upstream_tries 2;
Nginx Reference