blob: bd25e427c0e13ce8525b98d296d60246a54f8e09 [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
56frontend frt_default
57 bind :8004
58 mode http
59 option httplog
60 default_backend bck_default
61
62backend bck_default
63 mode http
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
73frontend frt_use_back
74 bind :8005
75 mode http
76 option httplog
77 use_backend bck_use_back if TRUE
78
79backend bck_use_back
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