使用Application Gateway

时间:2018-04-17 02:08:47

标签: azure azure-web-sites azure-application-gateway

我在Application Gateway后面有2个Web应用程序。我想通过http://<aap_gateway_pub_ip>/web1访问http://webapp1.azurewebsites.nethttp://<aap_gateway_pub_ip>/web2应该转到http://webapp2.azurewebsites.net。我已经定义了基于路径的规则,如:

$web1PathRule = New-AzureRmApplicationGatewayPathRuleConfig -Name web1pathrule -Paths "/web1" -BackendAddressPool $regbackendpool -BackendHttpSettings $poolSetting

$web2PathRule = New-AzureRmApplicationGatewayPathRuleConfig -Name web2pathrule  -Paths "/web2" -BackendAddressPool $accbackendpool -BackendHttpSettings $poolSetting

$urlpathmap = New-AzureRmApplicationGatewayUrlPathMapConfig -Name urlpathmap -PathRules $web1PathRule, $web2PathRule -DefaultBackendAddressPool $defaultPool -DefaultBackendHttpSettings $poolSetting

$urlRoutingRule = New-AzureRmApplicationGatewayRequestRoutingRule -Name routingrule-001 -RuleType PathBasedRouting -HttpListener $defaultlistener -UrlPathMap $urlpathmap

问题是当我直接访问http://<aap_gateway_pub_ip>请求进入默认池web1后端池并打开web1应用时。但是当我访问http://<aap_gateway_pub_ip>/web1时,它会返回404错误。

需要哪些其他配置才能使其正常工作?

1 个答案:

答案 0 :(得分:-1)

请遵循其他后端http设置和探针配置,以便与Web Apps集成以正常工作。文档是here

相关问题