parent
088a33b33a
commit
60796abcd5
@ -221,6 +221,10 @@
|
|||||||
port: 8082
|
port: 8082
|
||||||
weight: 1
|
weight: 1
|
||||||
health_check: max_fails=3 fail_timeout=5s
|
health_check: max_fails=3 fail_timeout=5s
|
||||||
|
backend_server_2:
|
||||||
|
address: unix:/var/run/control.unit.sock
|
||||||
|
weight: 1
|
||||||
|
health_check: max_fails=3 fail_timeout=5s
|
||||||
frontend:
|
frontend:
|
||||||
template_file: http/default.conf.j2
|
template_file: http/default.conf.j2
|
||||||
conf_file_name: frontend_default.conf
|
conf_file_name: frontend_default.conf
|
||||||
|
@ -10,7 +10,7 @@ upstream {{ item.value.upstreams[upstream].name }} {
|
|||||||
zone {{ item.value.upstreams[upstream].zone_name }} {{ item.value.upstreams[upstream].zone_size }};
|
zone {{ item.value.upstreams[upstream].zone_name }} {{ item.value.upstreams[upstream].zone_size }};
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for server in item.value.upstreams[upstream].servers %}
|
{% for server in item.value.upstreams[upstream].servers %}
|
||||||
server {{ item.value.upstreams[upstream].servers[server].address }}:{{ item.value.upstreams[upstream].servers[server].port }} weight={{ item.value.upstreams[upstream].servers[server].weight|default("1") }} {{ item.value.upstreams[upstream].servers[server].health_check|default("") }};
|
server {{ item.value.upstreams[upstream].servers[server].address }}{{(":" + item.value.upstreams[upstream].servers[server].port | string) if item.value.upstreams[upstream].servers[server].port is defined}} weight={{ item.value.upstreams[upstream].servers[server].weight | default("1") }} {{ item.value.upstreams[upstream].servers[server].health_check | default("") }};
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if item.value.upstreams[upstream].sticky_cookie %}
|
{% if item.value.upstreams[upstream].sticky_cookie %}
|
||||||
sticky cookie srv_id expires=1h path=/;
|
sticky cookie srv_id expires=1h path=/;
|
||||||
|
Loading…
Reference in New Issue
Block a user