I have several app services that I want to use application gateway to sit in front of and route traffic to using URL Routing. For example:
- api1-app-service
- api2-app-service
- website1-app-service
I would like to use the Application Gateway with a custom domain in front of it, and route the traffic like this:
- test.app.com/api/something -> api1-app-service
- test.app.com/api/different -> api2-app-service
- test.app.com/ -> website1-app-service
I setup 3 different backend pools and a url routing rule that looks like this:
rule1 | /api/something* | backendPool1
rule2 | /api/different* | backendPool2
default rule | backendPool3
The problem I am having is that the direction here (https://blogs.msdn.microsoft.com/waws/2017/11/21/setting-up-application-gateway-with-an-app-service-that-uses-azure-active-directory-authentication/) says that the app service has to be setup with the custom domain that you are pointing to the application gateway (test.app.com in my example), but I can't configure test.app.com to go to multiple app services. I get an error that the hostname is already mapped to another app service (which is true, when trying to map to api2-app-service test.app.com is configured to api1-app-service). Is is possible to setup an application gateway in front of multiple app services?