~ubuntu-branches/ubuntu/intrepid/haproxy/intrepid

« back to all changes in this revision

Viewing changes to debian/haproxy.cfg

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Cornet
  • Date: 2007-08-17 09:33:41 UTC
  • Revision ID: james.westby@ubuntu.com-20070817093341-l6pfw4urfkbby5fe
Tags: 1.3.12.dfsg-1
* Initial release (Closes: #416397).
* The DFSG removes files with GPL-incompatible license and adds a
  re-implementation by me.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Quite bloated example. Pick what you need.
 
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
        #debug
 
9
        #quiet
 
10
        user haproxy
 
11
        group haproxy
 
12
 
 
13
defaults
 
14
        log     global
 
15
        mode    http
 
16
        option  httplog
 
17
        option  dontlognull
 
18
        retries 3
 
19
        redispatch
 
20
        maxconn 2000
 
21
        contimeout      5000
 
22
        clitimeout      50000
 
23
        srvtimeout      50000
 
24
 
 
25
listen  appli1-rewrite 0.0.0.0:10001
 
26
        cookie  SERVERID rewrite
 
27
        balance roundrobin
 
28
        server  app1_1 192.168.34.23:8080 cookie app1inst1 check inter 2000 rise 2 fall 5
 
29
        server  app1_2 192.168.34.32:8080 cookie app1inst2 check inter 2000 rise 2 fall 5
 
30
        server  app1_3 192.168.34.27:8080 cookie app1inst3 check inter 2000 rise 2 fall 5
 
31
        server  app1_4 192.168.34.42:8080 cookie app1inst4 check inter 2000 rise 2 fall 5
 
32
 
 
33
listen  appli2-insert 0.0.0.0:10002
 
34
        option  httpchk
 
35
        balance roundrobin
 
36
        cookie  SERVERID insert indirect nocache
 
37
        server  inst1 192.168.114.56:80 cookie server01 check inter 2000 fall 3
 
38
        server  inst2 192.168.114.56:81 cookie server02 check inter 2000 fall 3
 
39
        capture cookie vgnvisitor= len 32
 
40
 
 
41
        option  httpclose               # disable keep-alive
 
42
        rspidel ^Set-cookie:\ IP=       # do not let this cookie tell our internal IP address
 
43
        
 
44
listen  appli3-relais 0.0.0.0:10003
 
45
        dispatch 192.168.135.17:80
 
46
 
 
47
listen  appli4-backup 0.0.0.0:10004
 
48
        option  httpchk /index.html
 
49
        option  persist
 
50
        balance roundrobin
 
51
        server  inst1 192.168.114.56:80 check inter 2000 fall 3
 
52
        server  inst2 192.168.114.56:81 check inter 2000 fall 3 backup
 
53
 
 
54
listen  ssl-relay 0.0.0.0:8443
 
55
        option  ssl-hello-chk
 
56
        balance source
 
57
        server  inst1 192.168.110.56:443 check inter 2000 fall 3
 
58
        server  inst2 192.168.110.57:443 check inter 2000 fall 3
 
59
        server  back1 192.168.120.58:443 backup
 
60
 
 
61
listen  appli5-backup 0.0.0.0:10005
 
62
        option  httpchk *
 
63
        balance roundrobin
 
64
        cookie  SERVERID insert indirect nocache
 
65
        server  inst1 192.168.114.56:80 cookie server01 check inter 2000 fall 3
 
66
        server  inst2 192.168.114.56:81 cookie server02 check inter 2000 fall 3
 
67
        server  inst3 192.168.114.57:80 backup check inter 2000 fall 3
 
68
        capture cookie ASPSESSION len 32
 
69
        srvtimeout      20000
 
70
 
 
71
        option  httpclose               # disable keep-alive
 
72
        option  checkcache              # block response if set-cookie & cacheable
 
73
 
 
74
        rspidel ^Set-cookie:\ IP=       # do not let this cookie tell our internal IP address
 
75
        
 
76
        errorloc        502     http://192.168.114.58/error502.html
 
77
        #errorfile      503     /etc/haproxy/errors/503.http
 
78