Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to customise Azure Web App 403, 503 error pages?

I am at a loss as to how to present a custom error page, with professional branding, for errors covering:

403 - Wep App stopped - currently get blue page with Azure text.
503 - Service Unavailable - currently get white page with "service unavailable"

I have tried to use CloudFlare custom error pages, but this does not work. For a 403, traffic still gets routed throught to Azure, where it gets the standard Azure 403 Page.

Must be possible?

like image 346
SamJolly Avatar asked Sep 24 '15 11:09

SamJolly


1 Answers

There are two categories of HTTP errors that can happen on Azure Web Apps:

  1. Those that happen in IIS on the Web Worker where your site is running.
  2. Those that happen before it reaches that. This includes cases when the site is stopped, in the process of restarting, or potentially affected by some other issue in the system.

One way to tell if an error is #1 or #2 is to turn on http logging, and see if it gets logged. Only #1 will.

For #1, you can customize errors using standard techniques. But for #2, there is currently no way for you do customize the pages returned by Azure.

like image 53
David Ebbo Avatar answered Sep 17 '22 22:09

David Ebbo