Guest User

Untitled

a guest
Aug 15th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. #---------------------------------------------------------------------
  2. # Global settings
  3. #---------------------------------------------------------------------
  4. global
  5. log 127.0.0.1 local2
  6. chroot /var/lib/haproxy
  7. pidfile /var/run/haproxy.pid
  8. maxconn 4000
  9. user haproxy
  10. group haproxy
  11. nbproc 4
  12. daemon
  13.  
  14. #---------------------------------------------------------------------
  15. # common defaults that all the 'listen' and 'backend' sections will
  16. # use if not designated in their block
  17. #---------------------------------------------------------------------
  18. defaults
  19. mode http
  20. log global
  21. option dontlognull
  22. option httpclose
  23. option httplog
  24. option forwardfor
  25. option redispatch
  26. timeout connect 10000 # default 10 second time out if a backend is not found
  27. timeout client 300000
  28. timeout server 300000
  29. maxconn 60000
  30. retries 3
  31.  
  32. #---------------------------------------------------------------------
  33. # Listen webfarm
  34. #---------------------------------------------------------------------
  35. listen webfarm 10.0.1.10:80
  36. mode http
  37. stats enable
  38. stats uri /stats
  39. stats realm HAProxy\ Statistics
  40. stats auth admin:P@szw03dz
  41. balance roundrobin
  42. cookie JSESSIONID prefix
  43. option httpclose
  44. option forwardfor
  45. option httpchk HEAD /check.txt HTTP/1.0
  46. server server1.yourserver.com 10.0.1.11:80 cookie A check
  47. server server2.yourserver.com 10.0.1.12:80 cookie B check
Add Comment
Please, Sign In to add comment