Skip to content

Instantly share code, notes, and snippets.

@jwkidd3
Last active November 13, 2018 18:21
Show Gist options
  • Save jwkidd3/39447123e4a47a66683e2eb1063a6080 to your computer and use it in GitHub Desktop.
Save jwkidd3/39447123e4a47a66683e2eb1063a6080 to your computer and use it in GitHub Desktop.
global
daemon
maxconn 256
defaults
mode http
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
listen cluster
bind 0.0.0.0:80
mode http
stats enable
balance roundrobin
{% for backend in groups['web'] %}
server {{ hostvars[backend]['ansible_hostname'] }} {{ hostvars[backend].ansible_all_ipv4_addresses.0 }} check port 80
{% endfor %}
option httpchk HEAD /index.php HTTP/1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment