The text below is selected, press Ctrl+C to copy to your clipboard. (⌘+C on Mac) No line numbers will be copied.
Guest
Sample HA proxy config
By Guest on 19th December 2018 10:37:34 AM | Syntax: TEXT | Views: 2



New paste | Download | Show/Hide line no. | Copy text to clipboard
  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.  
  11. defaults
  12.         log     global
  13.         mode    http
  14.         option  httplog
  15.         option  dontlognull
  16.         timeout connect 5000
  17.         timeout client  50000
  18.         timeout server  50000
  19.         errorfile 400 /etc/haproxy/errors/400.http
  20.         errorfile 403 /etc/haproxy/errors/403.http
  21.         errorfile 408 /etc/haproxy/errors/408.http
  22.         errorfile 500 /etc/haproxy/errors/500.http
  23.         errorfile 502 /etc/haproxy/errors/502.http
  24.         errorfile 503 /etc/haproxy/errors/503.http
  25.         errorfile 504 /etc/haproxy/errors/504.http
  26.  
  27. frontend localnodes
  28.     bind *:80
  29.     mode http
  30.     default_backend nodes
  31.  
  32. backend nodes
  33.     mode http
  34.     balance roundrobin
  35.     option forwardfor
  36.     http-request set-header X-Forwarded-Port %[dst_port]
  37.     http-request add-header X-Forwarded-Proto https if { ssl_fc }
  38.     option httpchk HEAD / HTTP/1.1\r\nHost:localhost
  39.     cookie SRV_ID prefix
  40.     server web01 <server-ip>:9000 cookie check
  41.     server web02 <server-ip>:9001 cookie check



  • Recent Pastes