haproxy中acl的与或非三种規則写法
当我们在haproxy里面需要使用use_backend或http-request等语句去调用定义过的acl规则时,可以跟平时写程序一样,使用与,或,非三种方式进行引用,比如:1.正常写法
use_backend SOME-BACKEND if SOME-ACL 2.或者写法
use_backend SOME-BACKEND if SOME-ACL || OTHER-ACLuse_backend SOME-BACKEND if SOME-ACL || !OTHER-ACL 3.非(不符合)写法
use_backend SOME-BACKEND if !SOME-ACLuse_backend SOME-BACKEND if !SOME-ACL !OTHER-ACL 4.与(and)写法
12use_backend SOME-BACKEND if ACL1 ACL2use_backend SOME-BACKEND if !ACL1 ACL2
页:
[1]