Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. global
  2. log /dev/log local0 debug
  3. chroot /var/lib/haproxy
  4. stats socket /run/haproxy/admin.sock mode 660 level admin
  5. stats timeout 30s
  6. user haproxy
  7. group haproxy
  8. daemon
  9.  
  10. defaults
  11. log global
  12. mode http
  13. option httplog
  14. option dontlognull
  15. timeout connect 5000
  16. timeout client 50000
  17. timeout server 50000
  18. errorfile 400 /etc/haproxy/errors/400.http
  19. errorfile 403 /etc/haproxy/errors/403.http
  20. errorfile 408 /etc/haproxy/errors/408.http
  21. errorfile 500 /etc/haproxy/errors/500.http
  22. errorfile 502 /etc/haproxy/errors/502.http
  23. errorfile 503 /etc/haproxy/errors/503.http
  24. errorfile 504 /etc/haproxy/errors/504.http
  25.  
  26. frontend webfront
  27. option forwardfor
  28. stats enable
  29. stats uri /haproxy?statis
  30. stats realm Haproxy Auth
  31. stats auth user:password
  32. bind *:80
  33. timeout client 86400000
  34. acl is_discourse hdr_end(host) -i discourse.mydomain.com
  35. use_backend discourse if is_discourse
  36. use_backend webserver if !is_discourse
  37.  
  38. backend discourse
  39. balance source
  40. option forwardfor
  41. option httpclose
  42. server server1 127.0.0.1:3080 weight 1 maxconn 1024 check inter 10000
  43.  
  44. backend webserver
  45. balance source
  46. option forwardfor
  47. option httpclose
  48. server server2 127.0.0.1:4080 weight 1 maxconn 1024 check inter 10000
  49.  
  50. root@kayak:/var/log/haproxy# tail haproxy.log
  51. Nov 26 21:25:25 kayak haproxy[21646]: Proxy webfront started.
  52. Nov 26 21:25:25 kayak haproxy[21646]: Proxy webfront started.
  53. Nov 26 21:25:25 kayak haproxy[21646]: Proxy discourse started.
  54. Nov 26 21:25:25 kayak haproxy[21646]: Proxy webserver started.
  55. Nov 26 21:28:10 kayak haproxy[21868]: Proxy webfront started.
  56. Nov 26 21:28:10 kayak haproxy[21868]: Proxy discourse started.
  57. Nov 26 21:28:10 kayak haproxy[21868]: Proxy webserver started.
  58. Nov 26 21:30:31 kayak haproxy[22045]: Proxy webfront started.
  59. Nov 26 21:30:31 kayak haproxy[22045]: Proxy discourse started.
  60. Nov 26 21:30:31 kayak haproxy[22045]: Proxy webserver started.
  61.  
  62. frontend webfront
  63. log /dev/log local0 debug
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement