blob: a3bf2ab0d9acd1308a2c0adb0355e74e285676f4 [file] [log] [blame]
Willy Tarreaub463dfb2008-06-07 23:08:56 +02001# This is a test configuration.
2# It is used to check the redirect keyword.
3
4global
5 maxconn 400
6 stats timeout 3s
7
8listen sample1
9 mode http
10 retries 1
11 option redispatch
12 timeout client 1m
13 timeout connect 5s
14 timeout server 1m
15 maxconn 400
16 bind :8000
17
18 acl url_test1 url_reg test1
19 acl url_test2 url_reg test2
Willy Tarreau79da4692008-11-19 20:03:04 +010020 acl url_test3 url_reg test3
Willy Tarreaub463dfb2008-06-07 23:08:56 +020021 redirect location /abs/test code 301 if url_test1
22 redirect prefix /pfx/test code 302 if url_test2
Willy Tarreau79da4692008-11-19 20:03:04 +010023 redirect prefix /pfx/test code 303 drop-query if url_test3
Willy Tarreaub463dfb2008-06-07 23:08:56 +020024
25 ### unconditional redirection
26 #redirect location https://example.com/ if TRUE
27
28 ### parser must detect invalid syntaxes below
29 #redirect
30 #redirect blah
31 #redirect location
32 #redirect location /abs/test
33 #redirect location /abs/test code
34 #redirect location /abs/test code 300
35 #redirect location /abs/test code 301
36 #redirect location /abs/test code 304
37
38 balance roundrobin
39 server act1 127.0.0.1:80 weight 10
40 option httpclose
41 stats uri /stats
42 stats refresh 5000ms