OS : Centos 6.8
Real Servers are CentOS 5.11
#---------------------------------------------------------------------
# Example configuration for a possible web application. See the
# full configuration options online.
#
# http://haproxy.1wt.eu/download/1.4/doc/configuration.txt
#
#---------------------------------------------------------------------
#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global
#
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 600 user haproxy group haproxy daemon
# turn on stats unix socket stats socket /var/lib/haproxy/stats tune.ssl.default-dh-param 2048
#--------------------------------------------------------------------- # common defaults that all the 'listen' and 'backend' sections will # use if not designated in their block
#---------------------------------------------------------------------
defaults
mode http
log global
option tcplog
option dontlognull
option forwardfor except 127.0.0.0/8
option http-server-close
option abortonclose
option redispatch
retries 3
####
timeout http-request 60s
timeout queue 60m
timeout connect 300s #s
timeout client 60m
timeout server 60m
timeout http-keep-alive 5s
timeout check 10s
#tune.ssl.default-dh-param 2048
frontend WEBAPPS_HTTP
bind 10.1.1.12:80
reqadd X-Forwarded-Proto:\ http
default_backend WEBAPPS_Backend
frontend WEBAPPS_HTTPS
bind 10.1.1.12:443 ssl crt /etc/ssl/webapps.pem force-tlsv12
reqadd X-Forwarded-Proto:\ https
default_backend WEBAPPS_Backend
backend WEBAPPS_Backend
balance roundrobin
stick-table type ip size 1m expire 1h
stick on src
option abortonclose
option forwardfor except 127.0.0.0/8
option http-server-close
option httpchk HEAD /check.html HTTP/1.0
server WEB_10.1.1.13 10.1.1.13:80 weight 20 minconn 80 maxconn 180 inter 5s check
server WEB_10.1.1.14 10.1.1.14:80 weight 20 minconn 80 maxconn 180 inter 5s check
server WEB_10.1.1.16 10.1.1.16:80 weight 20 minconn 80 maxconn 160 inter 5s check
listen stats 10.1.1.12:8443
mode http
log global
maxconn 10
timeout client 100s
timeout server 100s
timeout connect 100s
timeout queue 100s
stats enable
stats hide-version
stats refresh 10s
stats show-node
stats scope WEBAPPS_Backend
stats auth hauser:Passworditsuptoyou
stats uri /stats
stats admin if TRUE