#StackBounty: #azure-application-gateway Application gateway path based routing is not working

Bounty: 50

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,

  1. Have created two backend pools as below,

i) API1 -> App services pointing to API1
ii) API2 -> App services pointing to API2

  1. Have mapped the front-end IP to the public IP of the gateway
  2. 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

enter image description here

  1. Have associated a rule to my listener to map the backend path based rule as below,

enter image description here

  1. 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,

  1. MyDomain.com/ -> Loads the default API response
  2. MyDomain.com/API1/ -> Gives HTTP 404 error response (Expected: Loads API1 response)
  3. 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.

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.