Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.
If you want to set up the custom error pages in the application using storage blob we have enable the “enabled from all networks” in the network access settings of the storage.
How do error pages work in the application gateway?
After you specify an error page in your application gateway's configuration, your gateway verifies the connectivity to the HTML page over the internet. It then downloads the file on its local cache.
Refer this link for details:
Create Azure Application Gateway custom error pages | Microsoft Learn
One possible way you can achieve this: As I mentioned above, we need to enable access from all networks in the storage. The application gateway verifies the error file and downloads it to the local cache. After that, we must disable all networks. The error file is then used from the local cache.
You can host the error page on the VM.
Or
Create the new storage account and enable all networks in the storage to host the error page in the application gateway.
Note: Application gateway doesn't periodically check the source file's location to fetch a new version. You can perform any configuration update on the gateway to manually update the file's cache.
I hope this has been helpful!
Your feedback is important so please take a moment to accept answers. If you still have questions, pleaslet us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!
Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.