File: test-acl.cfg

package info (click to toggle)
haproxy 1.5.8-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 7,732 kB
  • sloc: ansic: 62,860; xml: 1,754; python: 925; makefile: 551; perl: 550; sh: 491
file content (26 lines) | stat: -rw-r--r-- 694 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# 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