haproxy.conf 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. global
  2. log /dev/log local0
  3. log /dev/log local1 notice
  4. chroot /var/lib/haproxy
  5. stats socket /run/haproxy/admin.sock mode 660 level admin
  6. stats timeout 30s
  7. user haproxy
  8. group haproxy
  9. daemon
  10. # Default SSL material locations
  11. ca-base /etc/ssl/certs
  12. crt-base /etc/ssl/private
  13. # See: https://ssl-config.mozilla.org/#server=haproxy&server-version=2.0.3&config=intermediate
  14. ssl-default-bind-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
  15. ssl-default-bind-ciphersuites TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256
  16. ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets
  17. defaults
  18. log global
  19. mode http
  20. option httplog
  21. option dontlognull
  22. timeout connect 5000
  23. timeout client 50000
  24. timeout server 50000
  25. errorfile 400 /etc/haproxy/errors/400.http
  26. errorfile 403 /etc/haproxy/errors/403.http
  27. errorfile 408 /etc/haproxy/errors/408.http
  28. errorfile 500 /etc/haproxy/errors/500.http
  29. errorfile 502 /etc/haproxy/errors/502.http
  30. errorfile 503 /etc/haproxy/errors/503.http
  31. errorfile 504 /etc/haproxy/errors/504.http
  32. frontend default-http
  33. mode http
  34. option httplog
  35. bind *:61336
  36. maxconn 16384
  37. default_backend local-docs-http
  38. backend local-docs-http
  39. mode http
  40. balance static-rr
  41. server docs-3000 127.0.0.1:61337 check maxconn 10240
  42. server docs-3001 127.0.0.1:61338 check maxconn 10240
  43. server docs-3002 127.0.0.1:61339 check maxconn 10240
  44. server docs-3003 127.0.0.1:61340 check maxconn 10240
  45. server docs-3004 127.0.0.1:61341 check maxconn 10240
  46. server docs-3005 127.0.0.1:61342 check maxconn 10240
  47. server docs-3006 127.0.0.1:61343 check maxconn 10240
  48. server docs-3007 127.0.0.1:61344 check maxconn 10240
  49. listen admin_stat # haproxy admin web
  50. bind 0.0.0.0:8888
  51. mode http
  52. #option http-use-htx
  53. #http-request use-service prometheus-exporter if { path /metrics }
  54. stats refresh 30s
  55. stats uri /admin?stats
  56. stats realm Haproxy\ Statistics
  57. stats auth admin:gogogo
  58. stats enable