aturch
aturch

Reputation: 53

Azure Application Gateway Url based routing does not work

I'm configuring Azure Application Gateway Url based routing for my two back-end pools and it is not working. My default routing configuration is pointing to b1 end point and it is reachable by blabla.cloudapp.azure.com When I add additional route path /b1/* I cannot access my back-end pool via blabla.cloudapp.azure.com/b1/. I get 404 page not found response. Can anyone please help me to understand what is wrong with my configuration?

Upvotes: 0

Views: 4979

Answers (1)

TravisCragg_MSFT
TravisCragg_MSFT

Reputation: 177

Azure Application Gateway URL Based routing will route different requests to different groups of servers (backend pools) based upon the URL of the request. Once the request is sent to a VM, it is received and treated like a normal web request. If the URL you are accessing is a Valid web URL for the web server that is receiving the request, then it will return a proper response.

The fact that you are getting a 404 error means that your web servers are receiving the request, but not finding anything at the requested location. One way you can troubleshoot this is to log onto the VM that should be receiving the request and trying the request in a browser replacing blabla.cloudapp.azure.com/with localhost/.

In the example you posted, you would need a folder from within your web directory called "b1" for the URL you specified to be a valid request.

You can use a Path-Based Rule to specify the default backend pool, as well as specific URL paths that should be sent to other backend pools. Here is an example of how to configure a Azure Application Gateway with URL based routing in the Portal.

Upvotes: 1

Related Questions