]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[TESTS] add a test case for the server redirection mechanism
authorWilly Tarreau <w@1wt.eu>
Tue, 12 Feb 2008 23:57:06 +0000 (00:57 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 12 Feb 2008 23:57:06 +0000 (00:57 +0100)
tests/test-redir.cfg [new file with mode: 0644]

diff --git a/tests/test-redir.cfg b/tests/test-redir.cfg
new file mode 100644 (file)
index 0000000..4aebafd
--- /dev/null
@@ -0,0 +1,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
+