How to show and remove maintenance page in Azure Web App

Umer Rashid 85 Reputation points
2024-06-26T12:05:58.71+00:00

Hello,

We have deployed a docker compose-based web application to Azure App Service. We want to show the maintenance page during downtime of the web application.

Please let us know what are the recommended ways to show maintenance page.

Regards,

Umar

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,328 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 17,366 Reputation points
    2024-07-04T04:17:56.4433333+00:00

    Hi @Umer Rashid There are a few ways to show a maintenance page for your webapp:

    1. Use Azure Front Door or Application Gateway:

       - Set up Azure Front Door or Application Gateway in front of your App Service.

       - Configure a custom error page for specific HTTP status codes (e.g., 503 Service Unavailable).

       - During maintenance, you can either return a 503 status from your app or stop the App Service.

    1. KUDU - Debug Console:
    • Go to Azure portal, your Web App ->Advanced Tools ->KUDU - Debug Console ->CMD -> site->wwwroot, check if web.config file exists or not. Create one html file with the content which you want to show
    1. Use Azure Traffic Manager:

       - Set up Azure Traffic Manager with your main App Service as the primary endpoint.

       - Create a secondary App Service with just the maintenance page.

       - During maintenance, disable the primary endpoint in Traffic Manager.

    1. Utilize Azure App Service Swap Slots:

       - Create a staging slot with the maintenance page.

       - During maintenance, swap the staging slot with the production slot.

    Hope that helps.

    -Grace

    0 comments No comments