Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-integ / recipes-connectivity / haproxy / files / haproxy.cfg
1 # this config needs haproxy-1.1.28 or haproxy-1.2.1
2
3 global
4         log 127.0.0.1   local0
5         log 127.0.0.1   local1 notice
6         #log loghost    local0 info
7         maxconn 4096
8         chroot /usr/share/haproxy
9         uid 99
10         gid 99
11         daemon
12         #debug
13         #quiet
14
15 defaults
16         log     global
17         mode    http
18         option  httplog
19         option  dontlognull
20         retries 3
21         option redispatch
22         maxconn 2000
23         timeout connect 5000
24         timeout client 50000
25         timeout server 50000
26
27 listen  appli1-rewrite
28 bind    0.0.0.0:10001
29         cookie  SERVERID rewrite
30         balance roundrobin
31         server  app1_1 192.168.34.23:8080 cookie app1inst1 check inter 2000 rise 2 fall 5
32         server  app1_2 192.168.34.32:8080 cookie app1inst2 check inter 2000 rise 2 fall 5
33         server  app1_3 192.168.34.27:8080 cookie app1inst3 check inter 2000 rise 2 fall 5
34         server  app1_4 192.168.34.42:8080 cookie app1inst4 check inter 2000 rise 2 fall 5
35
36 listen  appli2-insert
37 bind    0.0.0.0:10002
38         option  httpchk
39         balance roundrobin
40         cookie  SERVERID insert indirect nocache
41         server  inst1 192.168.114.56:80 cookie server01 check inter 2000 fall 3
42         server  inst2 192.168.114.56:81 cookie server02 check inter 2000 fall 3
43         capture cookie vgnvisitor= len 32
44
45         option  httpclose               # disable keep-alive
46         rspidel ^Set-cookie:\ IP=       # do not let this cookie tell our internal IP address
47         
48 listen  appli3-relais
49 bind    0.0.0.0:10003
50         dispatch 192.168.135.17:80
51
52 listen  appli4-backup
53 bind 0.0.0.0:10004
54         option  httpchk /index.html
55         option  persist
56         balance roundrobin
57         server  inst1 192.168.114.56:80 check inter 2000 fall 3
58         server  inst2 192.168.114.56:81 check inter 2000 fall 3 backup
59
60 listen  ssl-relay 
61 bind    0.0.0.0:8443
62         option  ssl-hello-chk
63         balance source
64         server  inst1 192.168.110.56:443 check inter 2000 fall 3
65         server  inst2 192.168.110.57:443 check inter 2000 fall 3
66         server  back1 192.168.120.58:443 backup
67
68 listen  appli5-backup
69 bind    0.0.0.0:10005
70         option  httpchk *
71         balance roundrobin
72         cookie  SERVERID insert indirect nocache
73         server  inst1 192.168.114.56:80 cookie server01 check inter 2000 fall 3
74         server  inst2 192.168.114.56:81 cookie server02 check inter 2000 fall 3
75         server  inst3 192.168.114.57:80 backup check inter 2000 fall 3
76         capture cookie ASPSESSION len 32
77         timeout server 20000
78
79         option  httpclose               # disable keep-alive
80         option  checkcache              # block response if set-cookie & cacheable
81
82         rspidel ^Set-cookie:\ IP=       # do not let this cookie tell our internal IP address
83         
84         errorloc        502     http://192.168.114.58/error502.html
85         errorfile       503     /etc/haproxy/errors/503.http
86