I currently have the following environment: two App Services for Container, which are two Web APIs deployed with the default domain (azurewebsites) and public access that currently work well, example:
- Swagger documentation endpoint: ...azurewebsites/swagger/index.html
- Business logic endpoints like: ...azurewebsites/api/users/select)
Now I need to access them using Application Gateway with a result like the following:
- https://< public-ip-app-gateway >/api1/swagger/index.html
- https://< public-ip-app-gateway >/api2/swagger/index.html
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:
Log stream App Service:
2025-02-19T13:22:20 Welcome, you are now connected to log- streaming service.Starting Log Tail -n 10 of existing logs ----/appsvctmp/volatile/logs/runtime/container.log 2025-02-19T13:21:18.2859098Z info: Microsoft.Hosting.Lifetime[14] 2025-02-19T13:21:18.2859870Z Now listening on: http://[::]:443 2025-02-19T13:21:18.2865131Z info: Microsoft.Hosting.Lifetime[0] 2025-02-19T13:21:18.2865338Z Application started. Press Ctrl+C to shut down. 2025-02-19T13:21:18.3039270Z info: Microsoft.Hosting.Lifetime[0] 2025-02-19T13:21:18.3039765Z Hosting environment: Production 2025-02-19T13:21:18.3039796Z info: Microsoft.Hosting.Lifetime[0] 2025-02-19T13:21:18.3039888Z Content root path: /app 2025-02-19T13:21:22.9290723Z warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3] 2025-02-19T13:21:22.9293296Z Failed to determine the https port for redirect.Ending Log Tail of existing logs ---Starting Live Log Stream --- 2025-02-19T13:23:20 No new trace in the past 1 min(s).