linux - 子域重定向到 haproxy 中的同一后端
问题描述
如何将所有子域的主机路径重定向配置到同一支持服务器。
例如
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/ 到同一个后端服务器
解决方案
我使用 hdr_end(host) 完成了它
acl host_star hdr_end(host) -i .example.com
推荐阅读
- powershell - 文件散列/校验和值是否不区分大小写?
- c# - c# DataGrid BindingListCollectionView 自定义过滤器抛出无效使用聚合函数的意思
- javascript - 如何在节点后打印另一个 div 元素
- vue.js - 使用 Leaflet 和 Vue.js 加载本地 Geojson 数据
- mysql - 如何将庞大的 MySQL 数据库迁移到 PostgreSQL 数据库
- report - 如何在spotfire的链接模板中传递下一列的参数
- c++ - 在 C++ 中打印对的优先级队列的所有值的问题
- android - 如何在没有 sdkmanager 的情况下安装或更新 Android SDK
- python - 硬币找零问题(但硬币数量最少)
- tensorflow - openVINO模型优化器可以用来转换tensorflow ann模型吗?