mirror of
https://github.com/geerlingguy/ansible-role-nginx.git
synced 2025-02-12 00:31:47 +01:00
Add keepalive option to upstreams configuration
This commit is contained in:
parent
e818255465
commit
86a18f8fd1
@ -59,6 +59,7 @@ nginx_vhosts: []
|
||||
nginx_upstreams: []
|
||||
# - name: myapp1
|
||||
# strategy: "ip_hash" # "least_conn", etc.
|
||||
# keepalive: 16 # optional
|
||||
# servers: {
|
||||
# "srv1.example.com",
|
||||
# "srv2.example.com weight=3",
|
||||
|
@ -53,6 +53,9 @@ http {
|
||||
{% for server in upstream.servers %}
|
||||
server {{ server }};
|
||||
{% endfor %}
|
||||
{% if upstream.keepalive is defined %}
|
||||
keepalive {{ upstream.keepalive }};
|
||||
{% endif %}
|
||||
}
|
||||
{% endfor %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user