mirror of
https://github.com/jc21/nginx-proxy-manager.git
synced 2024-08-30 18:22:48 +00:00
feat(streams): Add least connection and max_fails if hosts > 1
This commit is contained in:
parent
32fb98fb7c
commit
d007b5c8a4
@ -5,8 +5,16 @@
|
||||
{% if enabled %}
|
||||
|
||||
upstream stream_{{ incoming_port }}_tcp {
|
||||
{% if forwarding_hosts.length > 1 -%}
|
||||
least_conn;
|
||||
{%- endif -%}
|
||||
|
||||
{% for forwarding_host in forwarding_hosts %}
|
||||
{% if forloop.first == true and forloop.last == true -%}
|
||||
server {{ forwarding_host }}:{{ forwarding_port }};
|
||||
{%- else -%}
|
||||
server {{ forwarding_host}}:{{ forwarding_port}} max_fails=3;
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user