I have configured 4 webapps behind Application gateway (ARM template):
- dummyapi1.azurewebsites.de/servicehosts/dummyapi1
- dummyapi2.azurewebsites.de/servicehosts/dummyapi2
- dummyapi3.azurewebsites.de/servicehosts/dummyapi3
- dummyapi4.azurewebsites.de/servicehosts/dummyapi4
I can open web apps when I go directly to dummyapiX.azurewebsites.de/servicehosts/dummyapiX.
I want routing work this way: when I go to https://PIPofApplicationGateway/servicehosts/dummyapiX it should redirect to
dummyapiX.azurewebsites.de/servicehosts/dummyapiX
But Application Gateway always redirect to default backend pool, therefore I get 404 error.
I created Custom probes that point to:
- /servicehosts/dummyapi1
- /servicehosts/dummyapi2
- /servicehosts/dummyapi3
- /servicehosts/dummyapi4
Backend health show Healthy status for all. Backend pools point to webapps FQDN. PickHostNameFromBackendAddress for httpsSettings and PickHostNameFromBackendHttpSettings for probes are set to true. No other Path related setting are not configured in httpsSettings.
The only path-based rule is:
- default backendpool is dummyapi4
- "/servicehosts/dummyapi1/*" to backendpooldummy1
- "/servicehosts/dummyapi2/*" to backendpooldummy2
- "/servicehosts/dummyapi3/*" to backendpooldummy3
Any suggestion? What might be a root cause?