Daniel Cuellar
Daniel Cuellar

Reputation: 3

Setting up App Service with Application Gateway

I currently have the following environment: two App Services for Container, which are two Web APIs deployed with the default domain (azurewebsites.net) and public access that currently work well, example:

Now I need to access them using Application Gateway with a result like the following:

that is, according to a path the App Gateway redirects me to the corresponding Web API and I can use the endpoints, this with the goal in the end that the Web APIs do not remain public

I followed the documentation to configure App Service with App Gateway and App Gateway with path-based routing rules but when I finish the steps and access the URLs I get a 404 Not Found

I would appreciate any additional information that I should take into account or that I am missing to carry out this configuration.

Update:

Upvotes: 0

Views: 60

Answers (1)

Aslesha Kantamsetti
Aslesha Kantamsetti

Reputation: 1556

when I finish the steps and access the URLs I get a 404 Not Found

Make sure both App Services are correctly added to the Backend Pool in Application Gateway like below.

enter image description here

As you have two App service, use path-based routing rules as shown below.

Rules-> Add multiple targets to create path-based rule -> Configure the Details ->Save.

enter image description here

enter image description here

Please refer this MS Documentation for better understanding about path-based routing.

  • As Azure Web Apps uses HTTPS, ensure Application Gateway Backend Settings also use HTTPS.

To know whether backend services are working fine or not, set up a Custom health probe in azure Application Gateway.

  • If the configured health probe receives a 200 OK response, Application Gateway routes traffic to that backend.

enter image description here

Upvotes: 0

Related Questions