Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions roles/haproxy/templates/haproxy_backend.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#---------------------------------------------------------------------
#
backend {{ application.name }}_be
option httpchk {{ application.ha_method }} {{ application.ha_url }}
option httpchk {{ application.ha_method }} {{ application.ha_url }}
http-check send ver HTTP/1.1 hdr Host {{ application.vhost_name }}

{%if application.x_forwarded_port is defined %}
Expand All @@ -35,8 +35,8 @@
cookie HTTPSERVERID insert nocache indirect httponly secure maxidle {{ haproxy_cookie_max_idle }}

{% for server in application.servers %}
server {{ server.label }} {{ server.ip }}:{% if server.port is defined %}{{ server.port }}{% else %}{{ application.port }}{% endif %} cookie {{ server.label }} check inter 8000 fall 5 rise 2 maxconn {{ application.maxconn | default('35') }} {% if application.sslbackend is defined%} ssl verify required verifyhost {{ application.backend_vhost_name }} ca-file {{ application.backend_ca_file }}{% endif %} weight 100
server {{ server.label }} {{ server.ip }}:{% if server.port is defined %}{{ server.port }}{% else %}{{ application.port }}{% endif %} cookie {{ server.label }} check inter 8000 fall 5 rise 2 maxconn {{ application.maxconn | default('35') }} {% if application.sslbackend is defined%} ssl verify required verifyhost {{ application.backend_vhost_name }} ca-file {{ application.backend_ca_file }}{% endif %} weight 50

{% endfor %}

{% endfor %}
Expand All @@ -48,7 +48,7 @@
#---------------------------------------------------------------------
#
backend {{ application.name }}_staging_be
option httpchk {{ application.ha_method }} {{ application.ha_url }}
option httpchk {{ application.ha_method }} {{ application.ha_url }}
http-check send ver HTTP/1.1 hdr Host {{ application.vhost_name }}

{%if application.x_forwarded_port is defined %}
Expand All @@ -62,8 +62,8 @@
cookie HTTPSERVERIDSTAGING insert nocache indirect httponly secure maxidle {{ haproxy_cookie_max_idle }}

{% for server in application.stagingservers %}
server {{ server.label }} {{ server.ip }}:{{ application.port }} cookie {{ server.label }} check inter 8000 fall 5 rise 2 maxconn {{ application.maxconn | default('35') }} {% if application.sslbackend is defined%} ssl verify required verifyhost {{ application.backend_vhost_name }} ca-file {{ application.backend_ca_file }}{% endif %} weight 100
server {{ server.label }} {{ server.ip }}:{{ application.port }} cookie {{ server.label }} check inter 8000 fall 5 rise 2 maxconn {{ application.maxconn | default('35') }} {% if application.sslbackend is defined%} ssl verify required verifyhost {{ application.backend_vhost_name }} ca-file {{ application.backend_ca_file }}{% endif %} weight 50

{% endfor %}
{% endif %}
{% endfor %}
Loading