Advertisement
lswest

Pelican HAProxy example

Mar 5th, 2016
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. global
  2. log 127.0.0.1 local0
  3. log 127.0.0.1 local1 notice
  4. uid 0
  5. gid 0
  6. # daemon
  7.  
  8. defaults
  9. log global
  10. mode http
  11. option httplog
  12. option dontlognull
  13. option forwardfor
  14. option http-server-close
  15. contimeout 5000
  16. clitimeout 50000
  17. srvtimeout 50000
  18. errorfile 400 /usr/local/etc/haproxy/errors/400.http
  19. errorfile 403 /usr/local/etc/haproxy/errors/403.http
  20. errorfile 408 /usr/local/etc/haproxy/errors/408.http
  21. errorfile 500 /usr/local/etc/haproxy/errors/500.http
  22. errorfile 502 /usr/local/etc/haproxy/errors/502.http
  23. errorfile 503 /usr/local/etc/haproxy/errors/503.http
  24. errorfile 504 /usr/local/etc/haproxy/errors/504.http
  25. stats enable
  26. stats auth username:password
  27. stats uri /haproxyStats
  28.  
  29. frontend http-in
  30. bind *:80
  31.  
  32. # Define hosts based on domain names
  33. acl host_test1 hdr(host) -i pelican.home.lan
  34.  
  35. ## figure out backend to use based on domainname
  36. use_backend pelican if host_test1
  37.  
  38.  
  39. backend pelican # pelican.home.lan container
  40. balance roundrobin
  41. option httpclose
  42. option forwardfor
  43. server s2 172.18.0.4:80 # This ip should be the ip of the pelican container
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement