I'm trying to match various conditions inside one backend, like this:
acl rule1 hdr_dom(host) -i ext1
acl rule2 utl_beg /img
default_backend back-server-http if rule1 and rule2
but, how can I put this "and" between the two rules?
I'm trying to match various conditions inside one backend, like this:
acl rule1 hdr_dom(host) -i ext1
acl rule2 utl_beg /img
default_backend back-server-http if rule1 and rule2
but, how can I put this "and" between the two rules?
Yes, this is the solution:
acl rule1 hdr_dom(host) -i www.uno.es hdr_dom(host) -i www.one.com
use_backend uno.com if rule1
acl rule1 hdr_dom(host) -i ext1 utl_beg /img
? –
Moise You don't need to use the word "and" between the two rules. It's implicit.
Source: http://haproxy.1wt.eu/download/1.5/doc/configuration.txt in Section 7.2
I think the below syntax will do the trick (check this link HAProxy - basic authentication for backend server)
acl rule1 hdr_dom(host) -i ext1
acl rule2 utl_beg /img
default_backend back-server-http if rule1 rule2
© 2022 - 2024 — McMap. All rights reserved.