global # to have these messages end up in /var/log/haproxy.log you will # need to: # # 1) configure syslog to accept network log events. This is done # by adding the '-r' option to the SYSLOGD_OPTIONS in # /etc/sysconfig/syslog # # 2) configure local2 events to go to the /var/log/haproxy.log # file. A line like the following can be added to # /etc/sysconfig/syslog # # local2.* /var/log/haproxy.log # log 127.0.0.1 local0 notice user haproxy group haproxy # turn on stats unix socket stats socket /var/lib/haproxy/stats defaults log global retries 3 timeout queue 1m # First cnx timeout connect 10s # Activity cnx timeout client 2m timeout server 2m option abortonclose frontend stats maxconn 500 mode http option httplog bind *:80 stats enable stats hide-version stats uri /stats # main frontend which proxys to the backends #--------------------------------------------------------------------- frontend proxy bind *:3128 default_backend squid #--------------------------------------------------------------------- # round robin balancing between the various backends #--------------------------------------------------------------------- backend squid balance leastconn mode http option httpclose option forwardfor server s1 squid1:3128 check server s2 squid2:3128 check server s3 squid3:3128 check server s4 squid4:3128 check