haproxy/tests/test-acl.cfg
Willy Tarreau 11382813a1 [TESTS] added test-acl.cfg to test some ACL combinations
various rules constructions can be tested with this test case.
2008-07-09 16:18:21 +02:00

27 lines
694 B
INI

# This sample configuration tests multiple ACL combinations. It requires
# HAProxy version 1.3.15 minimum.
global
maxconn 100
frontend http-in
bind :8000-8003
mode http
clitimeout 30000
acl p1 dst_port 8001
acl p2 dst_port 8002
acl p3 dst_port 8003
acl d1 dst 127.0.0.1
acl d2 dst 127.0.0.2
acl d3 dst 127.0.0.3
redirect location d1&p2|d2&p1 if d1 p2 or d2 p1
redirect location d1&p1 if d1 p1
redirect location !(d2|d3) unless d2 or d3
redirect location d2&!p1 if d2 !p1
redirect location !d2&p1 if !d2 p1
redirect location !!d2 unless !d2
block if d3