## ## haproxy.cfg -- HAProxy server configuration ## global daemon log 127.0.0.1 local0 notice pidfile @l_prefix@/var/haproxy/run/haproxy.pid stats socket @l_prefix@/var/haproxy/run/haproxy.sock mode 600 level admin stats timeout 2m user @l_nusr@ group @l_ngrp@ maxconn 4096 nbproc 1 nbthread 8 defaults log global mode http option httplog option dontlognull retries 3 option redispatch maxconn 2000 timeout connect 5s timeout client 60s timeout server 60s listen stats bind 127.0.0.1:6644 mode http maxconn 10 no log acl network_allowed src 127.0.0.0/8 tcp-request connection reject if !network_allowed stats enable stats uri / listen example-http-proxy bind 127.0.0.1:8080 balance roundrobin option httpchk OPTIONS * HTTP/1.1\r\nHost:\ www server server1 127.0.0.1:8081 cookie server1 check inter 2000 rise 2 fall 5 server server2 127.0.0.1:8082 cookie server2 check inter 2000 rise 2 fall 5 cookie SERVERID insert indirect nocache http-request del-header ^Server:.* http-response del-header ^Set-cookie:\ IP= listen example-https-proxy bind 127.0.0.1:8443 balance source option ssl-hello-chk server server1 127.0.0.1:8444 check inter 2000 rise 2 fall 5 server server2 127.0.0.1:8445 check inter 2000 rise 2 fall 5