View file File name : haproxy.cfg Content :#--------------------------------------------------------------------- # Example configuration for a possible web application. See the # full configuration options online. # # http://haproxy.1wt.eu/download/1.3/doc/configuration.txt # #--------------------------------------------------------------------- #--------------------------------------------------------------------- # Global settings #--------------------------------------------------------------------- global log 127.0.0.1 local2 info chroot /var/lib/haproxy pidfile /var/run/haproxy.pid maxconn 512 user haproxy group haproxy daemon #--------------------------------------------------------------------- # common defaults that all the 'listen' and 'backend' sections will # use if not designated in their block #--------------------------------------------------------------------- defaults mode tcp log global option dontlognull option httpclose option tcplog # option forwardfor # option redispatch timeout connect 200 timeout client 72h timeout server 72h maxconn 5000 retries 2 #--------------------------------------------------------------------- # stats listener #--------------------------------------------------------------------- listen stats bind *:1936 mode http stats enable stats hide-version stats realm Haproxy\ Statistics stats uri / #--------------------------------------------------------------------- # #--------------------------------------------------------------------- ############################################### frontend db bind *:7706 mode tcp #option tcplog default_backend db backend db mode tcp server localhost localhost:3306 check