
global
	log 127.0.0.1	local0
	log 127.0.0.1	local1 notice
	#log loghost	local0 info
	maxconn 1024
	chroot /var/haproxy
	uid 604
	gid 604
	daemon
	#debug
	#quiet
	pidfile	/var/run/haproxy.pid

defaults
	log	global
	mode	http
	option	httplog
	option	dontlognull
	option	redispatch
	retries	3
	maxconn	2000
	contimeout	5000
	clitimeout	50000
	srvtimeout	50000
	stats enable
	stats auth admin:mekmitasdigoat

listen	appli1-rewrite 0.0.0.0:10001
	cookie	SERVERID rewrite
	balance	roundrobin
	server	app1_1 192.168.34.23:8080 cookie app1inst1 check inter 2000 rise 2 fall 5
	server	app1_2 192.168.34.32:8080 cookie app1inst2 check inter 2000 rise 2 fall 5
	server	app1_3 192.168.34.27:8080 cookie app1inst3 check inter 2000 rise 2 fall 5
	server	app1_4 192.168.34.42:8080 cookie app1inst4 check inter 2000 rise 2 fall 5

listen	appli2-insert 0.0.0.0:10002
	option	httpchk
	balance	roundrobin
	cookie	SERVERID insert indirect nocache
	server	inst1 192.168.114.56:80 cookie server01 check inter 2000 fall 3
	server	inst2 192.168.114.56:81 cookie server02 check inter 2000 fall 3
	capture cookie vgnvisitor= len 32

	option	httpclose		# disable keep-alive
	rspidel ^Set-cookie:\ IP=	# do not let this cookie tell our internal IP address
	
listen	appli3-relais 0.0.0.0:10003
	dispatch 192.168.135.17:80

listen	appli4-backup 0.0.0.0:10004
	option	httpchk /index.html
	option	persist
	balance	roundrobin
	server	inst1 192.168.114.56:80 check inter 2000 fall 3
	server	inst2 192.168.114.56:81 check inter 2000 fall 3 backup

listen	ssl-relay 0.0.0.0:8443
	option	ssl-hello-chk
	balance	source
	server	inst1 192.168.110.56:443 check inter 2000 fall 3
	server	inst2 192.168.110.57:443 check inter 2000 fall 3
	server	back1 192.168.120.58:443 backup

