haproxy.cfg.tpl 846 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. # HAProxy configuration template
  2. global
  3. daemon
  4. log stdout local0
  5. {%- if template_directives["global"] %}
  6. {%- for directive in template_directives["global"] %}
  7. {{ directive }}
  8. {%- endfor %}
  9. {%- endif %}
  10. defaults
  11. mode http
  12. timeout connect 5000ms
  13. timeout client 5000ms
  14. timeout server 50000ms
  15. option httplog
  16. log global
  17. {%- if template_directives["defaults"] %}
  18. {%- for directive in template_directives["defaults"] %}
  19. {{ directive }}
  20. {%- endfor %}
  21. {%- endif %}
  22. listen http
  23. bind {{ listen_addr }}:{{ listen_port }}
  24. option httplog
  25. {%- if template_directives["frontend_http"] %}
  26. {%- for directive in template_directives["frontend_http"] %}
  27. {{ directive }}
  28. {%- endfor %}
  29. {%- endif %}
  30. server dummy {{ backend_host }}:{{ backend_port }}