blob: 588812c30d40c153cd93c8af7b1596ebb15cc236 [file] [log] [blame]
Willy Tarreaud1eb3f02007-09-18 19:52:58 +02001# This is a test configuration.
2# It must load-balance across active servers. Check local apache logs to
3# verify :
4#
5# tail /var/log/apache/access_log
6
7
8global
9 maxconn 10000
10
11defaults
12 log 127.0.0.1:514 local0
13 balance roundrobin
14 contimeout 3000
15 srvtimeout 20000
16 clitimeout 10000
17 option dontlognull
18
19listen no_cookie
20 bind :8000
21 retries 2
22 redispatch
23 mode http
24 option httplog
25 balance roundrobin
26 server dead1 1.1.1.1:80
27 server good1 127.0.0.1:80
28
29# this one sends the connection to dead1, retries, then to good1, assigns
30# the cookie. Subsequent connection will try to s1 again and should try good1.
31listen cookie
32 bind :8001
33 retries 2
34 redispatch
35 mode http
36 option httplog
37 cookie SRV insert indirect nocache
38 balance roundrobin
39 server dead1 1.1.1.1:80 cookie s1
40 server good1 127.0.0.1:80 cookie s1
41
42# this one sends the connection to dead1, retries, then to good1, assigns
43# the cookie. Subsequent connection will try to s1 again and will stick to it.
44listen cookie_persist
45 bind :8002
46 retries 2
47 redispatch
48 option persist
49 mode http
50 option httplog
51 cookie SRV insert indirect nocache
52 balance roundrobin
53 server dead1 1.1.1.1:80 cookie s1
54 server good1 127.0.0.1:80 cookie s1
55
Willy Tarreaua7e76142007-11-03 14:28:39 +010056frontend frt_default_tcp
57 bind :8003
58 mode tcp
59 option httplog
60 default_backend bck_default_tcp
61
62backend bck_default_tcp
63 mode tcp
64 option httplog
65 retries 2
66 redispatch
67 balance roundrobin
68 contimeout 1000
69 srvtimeout 25000
70 server dead1 1.1.1.1:80
71 server good1 127.0.0.1:80
72
Willy Tarreaud1eb3f02007-09-18 19:52:58 +020073frontend frt_default
74 bind :8004
75 mode http
76 option httplog
77 default_backend bck_default
78
79backend bck_default
80 mode http
81 option httplog
82 retries 2
83 redispatch
84 balance roundrobin
85 contimeout 1000
86 srvtimeout 25000
87 server dead1 1.1.1.1:80
88 server good1 127.0.0.1:80
89
90frontend frt_use_back
91 bind :8005
92 mode http
93 option httplog
94 use_backend bck_use_back if TRUE
95
96backend bck_use_back
97 mode http
98 option httplog
99 retries 2
100 redispatch
101 balance roundrobin
102 contimeout 1000
103 srvtimeout 25000
104 server dead1 1.1.1.1:80
105 server good1 127.0.0.1:80
106