blob: 705c93e3aa8653abefb00ddb431c8ee9c7ec046e [file] [log] [blame]
willy tarreau197e8ec2005-12-17 14:10:59 +01001# this config needs haproxy-1.1.23
2
willy tarreau240afa62005-12-17 13:14:35 +01003global
4 log 127.0.0.1 local0
willy tarreau8337c6b2005-12-17 13:41:01 +01005 log 127.0.0.1 local1 notice
6 #log loghost local0 info
willy tarreau240afa62005-12-17 13:14:35 +01007 maxconn 4096
8 chroot /tmp
9 uid 11
10 gid 2
11 daemon
12 #debug
13 #quiet
14
willy tarreau197e8ec2005-12-17 14:10:59 +010015defaults
willy tarreau240afa62005-12-17 13:14:35 +010016 log global
17 mode http
18 option httplog
19 option dontlognull
willy tarreau240afa62005-12-17 13:14:35 +010020 retries 3
21 redispatch
22 maxconn 2000
23 contimeout 5000
24 clitimeout 50000
25 srvtimeout 50000
willy tarreau197e8ec2005-12-17 14:10:59 +010026
27listen appli1-rewrite 0.0.0.0:10001
28 cookie SERVERID rewrite
29 balance roundrobin
30 server app1_1 192.168.34.23:8080 cookie app1inst1 check inter 2000 rise 2 fall 5
31 server app1_2 192.168.34.32:8080 cookie app1inst2 check inter 2000 rise 2 fall 5
32 server app1_3 192.168.34.27:8080 cookie app1inst3 check inter 2000 rise 2 fall 5
33 server app1_4 192.168.34.42:8080 cookie app1inst4 check inter 2000 rise 2 fall 5
34
willy tarreau240afa62005-12-17 13:14:35 +010035listen appli2-insert 0.0.0.0:10002
willy tarreaubc4e1fb2005-12-17 13:32:07 +010036 option httpchk
willy tarreau240afa62005-12-17 13:14:35 +010037 balance roundrobin
38 cookie SERVERID insert indirect nocache
39 server inst1 192.168.114.56:80 cookie server01 check inter 2000 fall 3
40 server inst2 192.168.114.56:81 cookie server02 check inter 2000 fall 3
willy tarreau8337c6b2005-12-17 13:41:01 +010041 capture cookie vgnvisitor= len 32
willy tarreau240afa62005-12-17 13:14:35 +010042
willy tarreau750a4722005-12-17 13:21:24 +010043 reqidel ^Connection: # disable keep-alive
willy tarreau240afa62005-12-17 13:14:35 +010044 reqadd Connection:\ close
45 rspidel ^Connection:
46 rspadd Connection:\ close
willy tarreau750a4722005-12-17 13:21:24 +010047 rspidel ^Set-cookie:\ IP= # do not let this cookie tell our internal IP address
willy tarreau240afa62005-12-17 13:14:35 +010048
49listen appli3-relais 0.0.0.0:10003
willy tarreau240afa62005-12-17 13:14:35 +010050 dispatch 192.168.135.17:80
willy tarreau240afa62005-12-17 13:14:35 +010051
willy tarreau8337c6b2005-12-17 13:41:01 +010052listen appli4-backup 0.0.0.0:10004
willy tarreau2f6ba652005-12-17 13:57:42 +010053 option httpchk /index.html
willy tarreau8337c6b2005-12-17 13:41:01 +010054 option persist
55 balance roundrobin
56 server inst1 192.168.114.56:80 check inter 2000 fall 3
57 server inst2 192.168.114.56:81 check inter 2000 fall 3 backup
willy tarreau8337c6b2005-12-17 13:41:01 +010058
59listen appli5-backup 0.0.0.0:10005
willy tarreau2f6ba652005-12-17 13:57:42 +010060 option httpchk *
willy tarreau8337c6b2005-12-17 13:41:01 +010061 balance roundrobin
62 cookie SERVERID insert indirect nocache
63 server inst1 192.168.114.56:80 cookie server01 check inter 2000 fall 3
64 server inst2 192.168.114.56:81 cookie server02 check inter 2000 fall 3
65 server inst3 192.168.114.57:80 backup check inter 2000 fall 3
66 capture cookie ASPSESSION len 32
willy tarreau197e8ec2005-12-17 14:10:59 +010067 srvtimeout 20000
willy tarreau8337c6b2005-12-17 13:41:01 +010068
69 reqidel ^Connection: # disable keep-alive
70 reqadd Connection:\ close
71 rspidel ^Connection:
72 rspadd Connection:\ close
73 rspidel ^Set-cookie:\ IP= # do not let this cookie tell our internal IP address
74
75 errorloc 502 http://192.168.114.58/error502.html
76