Azure Application Gateway – A Guide for Allowing API Gateway Access without Landing Page

It is commonly known that API site will not need a landing page because it is not for website display purpose. However, by default Azure Application Gateway does not allow the site without landing page and it will treat it as unhealthy state, user cannot access the site if the Application Gateway stated the website is in unhealthy state.

Therefore, this post will guide you how to allow API Gateway Access without Landing Page.

The steps for the whole configuration will be:

  1. Create a Custom Health Probe
  2. Configure a Custom Health Probe
  3. Verify the Backend Health after configured a Custom Health Probe

Step 1 – Create a Custom Health Probe

Visit to “Application Gateway” and select “Health Probes”, then click “Add” to create a custom health probe.

Step 2 – Configure a Custom Health Probe

By default, health probe, if the website does not have landing page, Azure Application Gateway will response the HTTP status code with “404”, which is error state. However, API gateway will not need landing page as well.

Therefore, just simply add 404 in the HTTP response status code match as follow:

Step 3 – Verify the Backend Health after configured a Custom Health Probe

After added 404 in the match HTTP code, Azure Application Gateway will treat code 404 is in “healthy” state rather than “unhealthy”.

Eric Chan
| + posts

Microsoft MVP
SOS Group Limited

Leave a comment

SOS Group Limited © 2024. All Rights Reserved.