子域重定向到haproxy中的相同后端

问题描述 投票:-1回答:1

如何配置所有子域到同一台备用服务器的主机路径重定向。

例如

my domain is example.com 
sub domains are *.example.com
I need to redirect *.example.com/abc/ to  another backed server.

我的前端ACL是

acl host_star hdr(host) -i *.example.com
use_backend back_live if host_star

acl is_node path_beg -i /abc/
use_backend backend_node if host_star is_node

我需要将abc.example.com/abc/和xyz.example.com/abc/移至同一后端服务器

linux load-balancing acl haproxy
1个回答
0
投票

我通过使用hdr_end(host)完成它

acl host_star hdr_end(host)-i .example.com

© www.soinside.com 2019 - 2024. All rights reserved.