07-07-2020 12:03 AM
07-07-2020 12:03 AM
I am looking to set up a complicated application gateway and seem to be struggling to get to get things right and am not sure if it something I am doing wrong or a limitation that I need to work around.
What I want to do is have the gateway handle sub domain routing (pretty easy) and path based routing (on it's on pretty easy) and direct the traffic to app service end points (not sure if this is causing the problem due to multi tenancy)
The sub domains are used currently to manage our different development environments (eg uat.contoso.com and dev.contoso.com)
The path based routing is for the various applications that we run. (uat.contoso.com/application1 and uat.contoso.com/application2)
I would love to change some of these things but the routing is legacy and a lot of stakeholders in the organisation are resistant to change.
I have tried a few times to set things up the way I believe they should be set up but I get 404 errors or redirects to the app service url (which I am avoiding as I want to create and internal private url not a public one)
Any pointers would be appreciated.
07-07-2020 06:28 PM
Hi @Youdhbir Singh ,
The health probes are responding with healthy. Correct me if I am wrong but health probes are only there to determine if traffic can be routed to an end point. So if a health probe reports healthy then the application gateway routes traffic. If not then the gateway responds to the client with a 502 error. In this case I am receiving a 404 so it shouldn't be the health probes?
07-08-2020 04:22 PM
07-10-2020 01:48 AMSolution
Hi @Charbelhanna ,
Thanks for reply.
I ended up solving my issue not through app gateway but through app service. Basically the problem was the HTTP settings needed to be set to override with new host name as it is an app service. This combined with the path based mapping resulted in a virtual path that did not exist. I attempted to use rewriting but that only went so far but setting a virtual path "/appname" to point at "site/wwwroot" and changing the default to point to a dummy folder achieved the outcome. I did need to change my health probes after this but again I would like to point out this was not a health probe issue it was a routing based issue.
07-10-2020 01:49 AM
I would also like to point out that URL rewrites are in preview and I did try them but they did not solve my problem at this stage. I will update if I find a different option in the future.