Willy Tarreau | a246e9e | 2010-10-04 20:20:05 +0200 | [diff] [blame] | 1 | # This is a test configuration. |
| 2 | # It is used to involve the various http-check expect features. It queries |
| 3 | # a local web server for an object which is called the same as the keyword. |
| 4 | |
| 5 | global |
| 6 | maxconn 500 |
| 7 | stats socket /tmp/sock1 mode 600 level admin |
| 8 | stats timeout 3000 |
| 9 | stats maxconn 2000 |
| 10 | |
| 11 | defaults |
| 12 | mode http |
| 13 | retries 1 |
| 14 | option redispatch |
| 15 | timeout connect 1000 |
| 16 | timeout client 5000 |
| 17 | timeout server 5000 |
| 18 | maxconn 400 |
| 19 | option http-server-close |
| 20 | |
| 21 | listen stats |
| 22 | bind :8080 |
| 23 | stats uri / |
| 24 | |
| 25 | backend chk-exp-status-nolb |
| 26 | # note: 404 should not produce an error here, just a soft-stop |
| 27 | balance roundrobin |
| 28 | option httpchk GET /status |
| 29 | http-check disable-on-404 |
| 30 | http-check expect status 200 |
| 31 | server s1 127.0.0.1:80 check inter 1000 |
| 32 | |
| 33 | backend chk-nexp-status-nolb |
| 34 | balance roundrobin |
| 35 | option httpchk GET /status |
| 36 | http-check disable-on-404 |
| 37 | http-check expect ! status 200 |
| 38 | server s1 127.0.0.1:80 check inter 1000 |
| 39 | |
| 40 | backend chk-exp-status |
| 41 | balance roundrobin |
| 42 | option httpchk GET /status |
| 43 | http-check expect status 200 |
| 44 | server s1 127.0.0.1:80 check inter 1000 |
| 45 | |
| 46 | backend chk-nexp-status |
| 47 | balance roundrobin |
| 48 | option httpchk GET /status |
| 49 | http-check expect ! status 200 |
| 50 | server s1 127.0.0.1:80 check inter 1000 |
| 51 | |
| 52 | backend chk-exp-rstatus |
| 53 | balance roundrobin |
| 54 | option httpchk GET /rstatus |
| 55 | http-check expect rstatus ^2[0-9][0-9] |
| 56 | server s1 127.0.0.1:80 check inter 1000 |
| 57 | |
| 58 | backend chk-nexp-rstatus |
| 59 | balance roundrobin |
| 60 | option httpchk GET /rstatus |
| 61 | http-check expect ! rstatus ^2[0-9][0-9] |
| 62 | server s1 127.0.0.1:80 check inter 1000 |
| 63 | |
| 64 | backend chk-exp-string |
| 65 | balance roundrobin |
| 66 | option httpchk GET /string |
| 67 | http-check expect string this\ is\ ok |
| 68 | server s1 127.0.0.1:80 check inter 1000 |
| 69 | |
| 70 | backend chk-nexp-string |
| 71 | balance roundrobin |
| 72 | option httpchk GET /string |
| 73 | http-check expect ! string this\ is\ ok |
| 74 | server s1 127.0.0.1:80 check inter 1000 |
| 75 | |
| 76 | backend chk-exp-rstring |
| 77 | balance roundrobin |
| 78 | option httpchk GET /rstring |
| 79 | http-check expect rstring this\ is\ ok |
| 80 | server s1 127.0.0.1:80 check inter 1000 |
| 81 | |
| 82 | backend chk-nexp-rstring |
| 83 | balance roundrobin |
| 84 | option httpchk GET /rstring |
| 85 | http-check expect ! rstring this\ is\ ok |
| 86 | server s1 127.0.0.1:80 check inter 1000 |
| 87 | |