Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I show "Down for maintenance" for site hosted behind Application gateway

We have a website hosted behind Azure Application gateway load balancer. When we take site down for maintenance it shows 502 error to end users, which isn't nice. Even if we put App_offline.htm, it shows 502.

Any other way by which this can be done? Thanks in advance.

like image 791
Amit Avatar asked Oct 17 '25 16:10

Amit


1 Answers

As of 26th Oct 2018 Application Gateway allows custom error pages which will show when sites are down for maintenance. https://feedback.azure.com/forums/217313-networking/suggestions/18749326-application-gateway-custom-error-pages

Go to the App Gateway, select listeners and the listener for your site. Edit and go to customer errors, you can specify for 403 and 502 (bad gateway) which is what is shown if you use app_offline or take the site down.

app gateway 502 custom error

Documentation here: https://learn.microsoft.com/en-us/azure/application-gateway/custom-error

like image 67
The BigGunn Avatar answered Oct 20 '25 07:10

The BigGunn