You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
88 lines
2.3 KiB
88 lines
2.3 KiB
5 months ago
|
# This is a test configuration.
|
||
|
# It is used to involve the various http-check expect features. It queries
|
||
|
# a local web server for an object which is called the same as the keyword.
|
||
|
|
||
|
global
|
||
|
maxconn 500
|
||
|
stats socket /tmp/sock1 mode 600 level admin
|
||
|
stats timeout 3000
|
||
|
stats maxconn 2000
|
||
|
|
||
|
defaults
|
||
|
mode http
|
||
|
retries 1
|
||
|
option redispatch
|
||
|
timeout connect 1000
|
||
|
timeout client 5000
|
||
|
timeout server 5000
|
||
|
maxconn 400
|
||
|
option http-server-close
|
||
|
|
||
|
listen stats
|
||
|
bind :8080
|
||
|
stats uri /
|
||
|
|
||
|
backend chk-exp-status-nolb
|
||
|
# note: 404 should not produce an error here, just a soft-stop
|
||
|
balance roundrobin
|
||
|
option httpchk GET /status
|
||
|
http-check disable-on-404
|
||
|
http-check expect status 200
|
||
|
server s1 127.0.0.1:80 check inter 1000
|
||
|
|
||
|
backend chk-nexp-status-nolb
|
||
|
balance roundrobin
|
||
|
option httpchk GET /status
|
||
|
http-check disable-on-404
|
||
|
http-check expect ! status 200
|
||
|
server s1 127.0.0.1:80 check inter 1000
|
||
|
|
||
|
backend chk-exp-status
|
||
|
balance roundrobin
|
||
|
option httpchk GET /status
|
||
|
http-check expect status 200
|
||
|
server s1 127.0.0.1:80 check inter 1000
|
||
|
|
||
|
backend chk-nexp-status
|
||
|
balance roundrobin
|
||
|
option httpchk GET /status
|
||
|
http-check expect ! status 200
|
||
|
server s1 127.0.0.1:80 check inter 1000
|
||
|
|
||
|
backend chk-exp-rstatus
|
||
|
balance roundrobin
|
||
|
option httpchk GET /rstatus
|
||
|
http-check expect rstatus ^2[0-9][0-9]
|
||
|
server s1 127.0.0.1:80 check inter 1000
|
||
|
|
||
|
backend chk-nexp-rstatus
|
||
|
balance roundrobin
|
||
|
option httpchk GET /rstatus
|
||
|
http-check expect ! rstatus ^2[0-9][0-9]
|
||
|
server s1 127.0.0.1:80 check inter 1000
|
||
|
|
||
|
backend chk-exp-string
|
||
|
balance roundrobin
|
||
|
option httpchk GET /string
|
||
|
http-check expect string this\ is\ ok
|
||
|
server s1 127.0.0.1:80 check inter 1000
|
||
|
|
||
|
backend chk-nexp-string
|
||
|
balance roundrobin
|
||
|
option httpchk GET /string
|
||
|
http-check expect ! string this\ is\ ok
|
||
|
server s1 127.0.0.1:80 check inter 1000
|
||
|
|
||
|
backend chk-exp-rstring
|
||
|
balance roundrobin
|
||
|
option httpchk GET /rstring
|
||
|
http-check expect rstring this\ is\ ok
|
||
|
server s1 127.0.0.1:80 check inter 1000
|
||
|
|
||
|
backend chk-nexp-rstring
|
||
|
balance roundrobin
|
||
|
option httpchk GET /rstring
|
||
|
http-check expect ! rstring this\ is\ ok
|
||
|
server s1 127.0.0.1:80 check inter 1000
|
||
|
|