I have a problem with HAProxy, it's a snippet of my haproxy.cfg below,
acl url_a path_beg /a
acl dom_eye hdr_dom(host) -i www.mydomin.com
use_backend eye1 if dom_eye
use_backend eye2 if dom_eye url_a
- when i visit www.mydomin.com/a, it use eye2
- when i visit www.mydomin.com/a/b, it use eye1
but I would expect that all the url begin with /a use eye2.
And, I found that when switch the order of use_backend like below,
acl url_a path_beg /a
acl dom_eye hdr_dom(host) -i www.mydomin.com
use_backend eye2 if dom_eye url_a
use_backend eye1 if dom_eye
it worked for me.
But I don't understand the "match order rule" of Haproxy and can't find any explain from google.
Any ideas on this?