Skip to content

Commit 2bce9ec

Browse files
Merge pull request #312343 from MicrosoftDocs/main
Auto Publish – main to live - 2026-02-26 06:00 UTC
2 parents 1ddc942 + 71f2ba4 commit 2bce9ec

120 files changed

Lines changed: 779 additions & 601 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 39 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,70 @@
11
---
22
title: Configure error pages on App Service
3-
description: Learn how to configure a custom error page on App Service
3+
description: Learn how to configure the custom error pages available on Azure App Service.
44
author: jefmarti
55
ms.topic: how-to
66
ms.custom: linux-related-content
7-
ms.date: 10/14/2024
7+
ms.date: 02/19/2026
88
ms.author: jefmarti
99
ms.service: azure-app-service
10+
#customer intent: As a website owner and designer, I want to configure custom error pages for my App Service apps so that I can present customized error pages to my website users if they encounter errors.
11+
1012
---
1113

1214
# Configure error pages on App Service
1315

14-
This article explains how to configure custom error pages on your web app. With App Service you can configure an error page for specific errors that will be presented to users instead of the default error page.
16+
Azure App Service lets you configure specific error pages to present to your web app users instead of the default error pages. This article explains how to configure these custom error pages for your web app.
1517

16-
### Prerequisite
17-
In this tutorial, we're adding a custom 403 error page to our web app hosted on App Service and test it with an IP restriction. To do so, you need the following:
18-
- a web app hosted on App Service w/ a Premium SKU
19-
- an html file under 10 kb in size
18+
The three types of error code pages available for customization in App Service are *403 Access restrictions*, *502 Gateway errors*, and *503 Service unavailable*. This article walks through adding a custom 403 error page to a web app hosted on App Service, and testing it by using an IP restriction.
2019

21-
## Upload an error page
22-
For this example, we're uploading and testing a 403 error page to present to the user. Name your html file to match the error code (for example, `403.html`). Once you have your html file prepared, you can upload it to your web app. In the configuration blade, you should see an **Error pages** tab. Click on this tab to view the error page options. If the options are greyed out, you need to upgrade to at least a Premium SKU to use this feature.
20+
## Prerequisites
2321

24-
Select the error code that you'd like to upload an error page for and click **Edit**. On the next screen, click the folder icon to select your html file. The file must be in html format and within the 10 kb size limit. Find your .html file and click on the **Upload** button at the bottom of the screen. Notice the Status in the table updates from Not Configured to Configured. Then click **Save** to complete the upload.
22+
- A web app hosted on an Azure App Service Premium SKU. You must have a Premium SKU to customize error pages.
23+
- An HTML file smaller than 10 kb that presents a 403 error message such as **Forbidden**. Name the HTML file to match the error code, in this case *403.html*.
2524

26-
## Confirm error page
27-
Once the custom error page is uploaded and saved, we can trigger and view the page. In this example, we can trigger the 403 error by using an IP restriction however you can also trigger a 403 error page by stopping the site.
25+
## Configure the custom error page
2826

29-
To set an IP restriction, go to the **Networking** blade and click the **Enabled with access restrictions** link under **Inbound traffic configuration**.
27+
Upload your custom error page and apply it to your web app.
3028

31-
Under the **Site access and rules** section, select the **+Add** button to create an IP restriction.
29+
1. On the Azure portal page for your web app, select **Settings** > **Configuration (preview)** from the left navigation menu.
30+
1. Select the **Error pages** tab on the **Configuration** page.
31+
1. On the **Error pages** page, select the **Browse** button next to the error code you want to configure, in this case **403**.
32+
1. Browse to your custom *403.html* error page and select **Open**. The file uploads, and the filename appears in the field next to the error code.
33+
1. Select the checkbox next to **Apply to all requests**, and then select **Apply**.
3234

33-
In the form that follows, you need to change the Action to **Deny** and fill out the **Priority** and **IP Address Block**. In this example, we use the **Inbound address** found on the Networking blade and we're setting it to /0 (for example, `12.123.12.123/0`). This disables all public access when visiting the site.
35+
>[!NOTE]
36+
>If the configuration options are greyed out, you need to upgrade to at least a Premium SKU to use this feature.
3437
35-
Once the Add rule form is filled out, select the **Add rule** button. Then click **Save**.
38+
>[!NOTE]
39+
>If you're using the legacy, nonpreview **Configuration** > **Error codes** page, select **Edit** next to the error code you want to configure. On the **Add custom error page (.html)** pane, select the folder icon to browse to and select your custom *403.html* file. After the file loads, select **Upload**.
3640
37-
Once saved, you need to restart the site for the changes to take effect. Go to your overview page and select **browse**. You should now see your custom error page load.
41+
## Confirm the error page
3842

39-
## Error codes
40-
App Service currently supports three types of error codes that are available to customize:
43+
Once you upload and apply the custom error page, you can trigger and view the page. For this example, trigger the 403 error by using an IP restriction. You can also trigger a 403 error page by stopping the site.
4144

42-
| Error code | description |
43-
| ------------- | ------------- |
44-
| 403 | Access restrictions |
45-
| 502 | Gateway errors |
46-
| 503 | Service unavailable |
45+
1. On the Azure portal page for your web app, select **Settings** > **Networking** from the left navigation menu.
46+
1. Under **Inbound traffic configuration** on the **Networking** page, copy the IP address next to **IP Addresses** to use in a later step.
47+
1. Next to **Public access restrictions**, select the link for **Enabled with no access restrictions**.
48+
1. On the **Access Restrictions** page, under **Site access**, select **Enabled from select virtual networks and IP addresses**.
49+
1. At the bottom of the page under **Site access and rules**, select **Add** to add an IP restriction.
50+
1. On the **Add rule** pane, give the rule a **Name** like *Test403*, set **Action** to **Deny**, and set **Priority** to *300*.
51+
1. Paste the IP address you copied from the main **Networking** page into the **IP Address Block** field, followed by */0*, for example *203.0.113.254/0*.
52+
1. Select **Add rule**.
53+
1. On the **Access Restrictions** page, select **Save**. If necessary, confirm the action and select **Continue**. This action disables all public access to the site.
4754

48-
## FAQ
49-
1. I've uploaded my error page, why doesn't it show when the error is triggered?
55+
Restart the site for the changes to take effect. Return to the **Overview** page for your site and select **Restart** from the top menu. When you select the URL to go to your site, you see your custom error page.
5056

51-
Custom error pages are triggered from front end failures. If the error is coming from the app level, it won't trigger or show the configured error page. If you want the error page to show for all requests, check the **Apply to all requests** box under the configured error code. This will show the error page for all requests matching the status code regardless of where it failed. Note, when this box is checked it will override any existing error pages that are configured for the app.
57+
## FAQ
5258

53-
2. Why is the error page feature greyed out?
59+
### Why doesn't my uploaded error page show when the error is triggered?
5460

55-
Error pages are currently a Premium feature. You need to use at least a Premium SKU to enable the feature.
61+
Make sure you select **Apply to all requests** when you configure the error page. By default, custom error pages are triggered only from front-end failures. Errors from the app level don't trigger or show the custom error page. Selecting **Apply to all requests** for the configured error code shows the error page for all requests that match the status code, regardless of where they failed. Selecting this option overrides any existing error pages configured for the app.
5662

57-
3. How can I reference a single error page across multiple apps?
63+
### Why is the error page feature grayed out?
5864

59-
If you need to use the same error page across multiple apps, you can link to your error page hosted in a storage account in your uploaded html file. Upload your error page to a [storage account](/azure/storage/common/storage-account-overview) and add the provided storage URL for your page in an `<iframe>` tag located in the html file uploaded to the app.
65+
You must use at least a Premium SKU to enable the error code feature.
6066

67+
### How can I use a custom error page across multiple apps?
6168

69+
You can host your custom HTML error page in an [Azure Storage account](/azure/storage/common/storage-account-overview), and add the page's storage URL in an `<iframe>` tag in the HTML file you upload to the app.
6270

Lines changed: 43 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,81 @@
11
---
22
title: Configure gRPC on App Service
3-
description: Learn how to configure a gRPC application with Azure App Service on Linux.
3+
description: Learn how to configure a Google Remote Procedure Call (gRPC) application with Azure App Service on Linux.
44
author: jefmarti
55
ms.topic: how-to
66
ms.custom: linux-related-content
7-
ms.date: 11/10/2023
7+
ms.date: 02/12/2026
88
ms.author: jefmarti
99
ms.service: azure-app-service
10+
#customer intent: As an Azure App Service developer, I want to learn how to configure gRPC for my Linux apps so I can streamline messages between my clients and server over HTTP/2.
11+
1012
---
1113

1214
# Configure gRPC on App Service
1315

14-
This article explains how to configure your web app for gRPC.
15-
16-
gRPC is a Remote Procedure Call framework that can streamline messages between your client and server over HTTP/2. Using the gRPC protocol over HTTP/2 enables the use of features like:
16+
This article explains how to configure your web app for gRPC, a remote procedure call framework that can streamline messages between your client and server over HTTP/2. Using the gRPC protocol over HTTP/2 lets you use features like:
1717

1818
- Multiplexing to send multiple parallel requests over the same connection.
1919
- Bidirectional streaming to send requests and responses simultaneously.
2020

21-
Support for gRPC is currently available on Azure App Service for Linux. To use gRPC on your web app, you need to configure your app by selecting the HTTP version, proxy, and port.
21+
Support for gRPC is available on Azure App Service for Linux. To use gRPC on your web app, you configure your app by selecting the HTTP version, proxy, and port.
2222

23-
For gRPC client and server samples for each supported language, see the [documentation on GitHub](https://github.com/Azure/app-service-linux-docs/tree/master/HowTo/gRPC).
23+
For gRPC client and server samples for each supported language, see [gRPC on App Service](https://github.com/Azure/app-service-linux-docs/tree/master/HowTo/gRPC) on GitHub.
2424

2525
## Prerequisite
2626

27-
Create your [web app](getting-started.md) as you normally would. Choose your preferred runtime stack, and choose Linux as your operating system.
27+
- A Linux [web app](getting-started.md) in Azure App Service that uses your preferred runtime stack.
28+
29+
## Configure gRPC
2830

2931
After you create your web app, configure the following details to enable gRPC before you deploy your application.
3032

3133
> [!NOTE]
32-
> If you're deploying a .NET gRPC app to App Service by using Visual Studio, skip to [step 3](#3-configure-the-http2-port). Visual Studio sets the HTTP version and the HTTP 2.0 proxy configuration for you.
33-
34-
## 1. Configure the HTTP version
34+
> If you're deploying a .NET gRPC app to App Service by using Visual Studio, skip to [Configure the HTTP/2 port](#configure-the-http2-port), because Visual Studio sets the HTTP version and HTTP 2.0 proxy configuration for you.
3535
36-
The first setting that you need to configure is the HTTP version:
36+
### Configure the HTTP version and HTTP 2.0 proxy
3737

38-
1. On the left pane of your web app, under **Settings**, go to **Configuration**.
39-
2. On the **General Settings** tab, scroll down to **Platform settings**.
40-
3. In the **HTTP version** dropdown list, select **2.0**.
41-
4. Select **Save**.
38+
Use the Azure portal page for your web app to configure your app's HTTP version and proxy.
4239

43-
This setting restarts your application and configures the front end to allow clients to make HTTP/2 calls.
40+
1. On the left navigation menu of your web app page, select **Settings** > **Configuration**.
41+
1. On the **General settings** tab of the **Stack settings** page, configure the following settings:
42+
- For **HTTP version**, select **2.0**.
43+
- For **HTTP 2.0 Proxy**, select **gRPC only**.
44+
1. Select **Apply**.
4445

45-
## 2. Configure the HTTP 2.0 proxy
46+
The **HTTP version** setting restarts your application and configures the front end to allow clients to make HTTP/2 calls. The **HTTP 2.0 Proxy** setting configures your site to receive HTTP/2 requests.
4647

47-
Next, you need to configure the HTTP 2.0 proxy:
48+
### Configure the HTTP/2 port
4849

49-
1. In the same **Platform settings** section, find the **HTTP 2.0 Proxy** setting and select **gRPC Only**.
50-
2. Select **Save**.
50+
App Service requires an application setting that specifically listens for HTTP/2 traffic in addition to HTTP/1.1 traffic. Use **App settings** to define the HTTP/2 port.
5151

52-
This setting configures your site to receive HTTP/2 requests.
52+
1. On the left navigation menu of your web app page, select **Settings** > **Environmental variables**.
53+
1. On the **App settings** tab of the **Environmental variables** page, select **Add**.
54+
1. On the **Add/Edit application setting** screen, add the following app setting:
55+
- For **Name**, enter *HTTP20_ONLY_PORT*.
56+
- For **Value**, enter *8585*.
57+
1. Select **Apply**, and confirm that your application might restart if necessary.
5358

54-
## 3. Configure the HTTP/2 port
59+
This setting configures the port on your application that listens for HTTP/2 requests.
5560

56-
App Service requires an application setting that specifically listens for HTTP/2 traffic in addition to HTTP/1.1 traffic. You define the HTTP/2 port in the app settings:
61+
Now that you configured the HTTP version, port, and proxy, you can successfully make HTTP/2 calls to your web app by using gRPC.
5762

58-
1. On the left pane of your web app, under **Settings**, go to **Environment variables**.
59-
2. On the **App settings** tab, add the following app settings to your application:
60-
- **Name** = **HTTP20_ONLY_PORT**
61-
- **Value** = **8585**
63+
### Provide a startup command
6264

63-
These settings configure the port on your application that's specified to listen for HTTP/2 requests.
65+
For Python applications, you must provide a custom startup command. For other languages, a startup command is optional.
6466

65-
Now that you've configured the HTTP version, port, and proxy, you can successfully make HTTP/2 calls to your web app by using gRPC.
67+
1. On the left navigation menu of your web app page, select **Settings** > **Configuration**.
68+
1. On the **Stack settings** page, select the **Stack settings** tab.
69+
1. Under **Startup command**, enter `python app.py`.
70+
1. Select **Apply**.
6671

67-
### (Optional) Python startup command
72+
## Requirements and limitations
6873

69-
For Python applications only, you also need to set a custom startup command:
74+
The following requirements and limitations apply to gRPC usage with App Service.
7075

71-
1. On the left pane of your web app, under **Settings**, go to **Configuration**.
72-
2. Under **General Settings**, add the following value for **Startup Command**: `python app.py`.
73-
74-
## Common topics
75-
76-
The following table can answer your questions about using gRPC with App Service.
77-
78-
> [!NOTE]
79-
> gRPC is not a supported feature in App Service Environment v2. Use App Service Environment v3.
80-
81-
| Topic | Answer |
82-
| --- | --- |
83-
| OS support | gRPC is available on Linux. Windows support is currently in preview. |
84-
| Language support | gRPC is supported for each language that supports gRPC. |
85-
| Client certificates | HTTP/2 enabled on App Service doesn't currently support client certificates. Client certificates need to be ignored when you're using gRPC. |
86-
| Secure calls | gRPC must make secure HTTP calls to App Service. You can't make nonsecure calls. |
87-
| Activity timeout | gRPC requests on App Service have a timeout request limit. gRPC requests time out after 20 minutes of inactivity. |
88-
| Custom containers | HTTP/2 and gRPC support is in addition to App Service HTTP/1.1 support. Custom containers that support HTTP/2 must also support HTTP/1.1. |
76+
- **App Service Environment version**. App Service Environment v2 doesn't support gRPC. Use App Service Environment v3.
77+
- **OS support**. gRPC is available on Linux. Windows support is currently in preview.
78+
- **Client certificates**. HTTP/2 on App Service doesn't support client certificates. Client certificates must be ignored when you use gRPC.
79+
- **Secure calls**. gRPC must make secure HTTP calls to App Service. You can't make nonsecure calls.
80+
- **Activity timeout**. App Service gRPC requests have a timeout request limit. gRPC requests time out after 20 minutes of inactivity.
81+
- **Custom containers**. HTTP/2 and gRPC support is in addition to App Service HTTP/1.1 support. Custom containers that support HTTP/2 must also support HTTP/1.1.

0 commit comments

Comments
 (0)