我想使用完全匹配的网址转发流量,例如在给定的前端中具有ACL规则的test.example.com
。当test.example.com\path
时,应移至另一个后端。我的设置有点复杂,这意味着仅为给定后端的路径指定acl匹配对我不起作用。
[ACL逻辑:将后端IF acl_match_exact_url用于其他一切acl_use_other_backend。
是否只有通过ACL
acl match_path path /path
acl match_host req.hdr(host) test.example.com
use_backend backend_one if match_path match_host
default_backend backend_two
您也可以使用base进行此操作,该操作将主机和路径连接到一个样本中,例如:
acl match_host_and_path base test.example.com/path use_backend backend_one if match_host_and_path default_backend backend_two