File: test-redir.cfg

package info (click to toggle)
haproxy 1.4.8-1%2Bsqueeze1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 5,220 kB
  • ctags: 4,072
  • sloc: ansic: 34,590; perl: 543; sh: 415; makefile: 377; xml: 124
file content (35 lines) | stat: -rw-r--r-- 1,212 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# This is a test configuration.
# It makes use of a farm built from 4 servers, 3 of which are remote and
# referenced only via an HTTP redirect (302), and the 4th one is normal.
# HTTP requests different from GET/HEAD should reach the servers directly
# while GET/HEAD should get redirected for the 3 first ones.

global
	#log /dev/log local0
	maxconn    1000
        stats socket /tmp/sock1 mode 600
        stats timeout 3000
        stats maxconn 2000

listen  sample1
	#log global
	#option httplog
        mode       http
        retries    1
        option redispatch
        contimeout 1000
        clitimeout 5000
        srvtimeout 5000
        maxconn    40000
        bind       :8080
        #balance    source
        balance    roundrobin
	option     allbackups
        server     rdr1 127.0.0.1:80 redir http://static1:80 weight 10 check inter 1000 fall 4
        server     rdr2 127.0.0.2:80 redir http://static2:80 weight 20 check inter 1000 fall 4
        server     rdr3 127.0.0.3:80 redir http://static3:80 weight 30 check inter 1000 fall 4
        server     dir4 127.0.0.4:80 redir weight 30 check inter 1000 fall 4
        option     httpclose
	stats      uri /stats
	stats      refresh 5