是否可以有多个通配符子域 azure 应用程序网关侦听器?
Is it possible to have multiple wildcard subdomain azure application gateway listeners?
我想托管多个域并处理子域通配符。这可能与单个应用程序网关有关吗?
例如,这是我尝试设置的监听器:
- app.example1.com -> poolA
- app.example2.com -> poolA
- *.example1.com -> poolB
- *.example2.com -> poolB
我 运行 遇到的问题是,当我去添加第二个应用程序网关侦听器时,我收到一条错误消息,指出它只能有 1 个“基本”类型。如果我尝试使用 * 创建第二个侦听器,我会收到一条错误消息,指出它是一个无效的主机值。有没有更好的方法来配置我可能遗漏的这种类型的路由?
当然,您可以在单个应用程序网关中托管多个站点和子域通配符。看看Application Gateway multiple site hosting。但它只是预览版,此功能处于预览状态,仅适用于应用程序网关的 Standard_v2 和 WAF_v2 SKU。它指出:
This feature is currently available only through Azure PowerShell and
Azure CLI. Portal support is coming soon. Please note that since
portal support is not fully available if you are using only the
HostNames parameter, the listener will appear as a Basic listener in
the portal and the Host name column of the listener list view will not
show the host names that are configured.
CLI 命令 az network application-gateway http-listener create
使用参数 host-names
对子域通配符起作用。
我想托管多个域并处理子域通配符。这可能与单个应用程序网关有关吗?
例如,这是我尝试设置的监听器:
- app.example1.com -> poolA
- app.example2.com -> poolA
- *.example1.com -> poolB
- *.example2.com -> poolB
我 运行 遇到的问题是,当我去添加第二个应用程序网关侦听器时,我收到一条错误消息,指出它只能有 1 个“基本”类型。如果我尝试使用 * 创建第二个侦听器,我会收到一条错误消息,指出它是一个无效的主机值。有没有更好的方法来配置我可能遗漏的这种类型的路由?
当然,您可以在单个应用程序网关中托管多个站点和子域通配符。看看Application Gateway multiple site hosting。但它只是预览版,此功能处于预览状态,仅适用于应用程序网关的 Standard_v2 和 WAF_v2 SKU。它指出:
This feature is currently available only through Azure PowerShell and Azure CLI. Portal support is coming soon. Please note that since portal support is not fully available if you are using only the HostNames parameter, the listener will appear as a Basic listener in the portal and the Host name column of the listener list view will not show the host names that are configured.
CLI 命令 az network application-gateway http-listener create
使用参数 host-names
对子域通配符起作用。