I’m trying to setup application gateway in-front of my two app services which are API’s sitting in a separate subnet on its own.
Let’s say API1 and API2.
I have exposed the app services only to be accessed using a private endpoint within a VNET.
The following are my setup with application gateway,
- Have created two backend pools as below,
i) API1 -> App services pointing to API1
ii) API2 -> App services pointing to API2
- Have mapped the front-end IP to the public IP of the gateway
- Have created an HTTPS inbound listener
i) Port: 443
ii) FrontendIP: Public IP of the gateway
iii) Have added my wild card certificate
iv) Listener type: Multi site
v) Host type: Single
vi) Domain name: MyDomain.com
- Have associated a rule to my listener to map the backend path based rule as below,
- To test in my windows hosts file I have added my public-IP to hostname created in my listener,
- 13.xx.xx.xx MyDomain.com
Now to test my routing logic, my default backend target is API1, where if I use mydomain.com/api2/ is suppose it would load the API2 response. But the following is happening for me,
- MyDomain.com/ -> Loads the default API response
- MyDomain.com/API1/ -> Gives HTTP 404 error response (Expected: Loads API1 response)
- MyDomain.com/API2/ -> Gives HTTP 404 error response (Expected: Loads API2 response)
Please let me know if one can share input on what am I missing here to get this sorted.