Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable Azure CDN for Azure storage blob static website?

After enabling static website on Azure storage, I have deployed an index.html to the $web blob container. https://<name>.<zone>.web.core.windows.net works fine.

To add custom domain with HTTPS support, it is recommended that we use Azure CDN to access the blobs. On the linked page to enable that, the page says

During preview of static websites support in Azure Storage, select "custom origin" from the "origin type" drop down menu to add your storage web endpoint. In Azure Portal, you will need to do this from your CDN Profile instead of directly in your storage account.

So I selected Custom Origin as the origin type and made <name>.<zone>.web.core.windows.net as the origin hostname.

However, trying to access https://<cdnendpointname>.azureedge.net/ is sending me to 404 Not Found page.

like image 824
Abhay Saraf Avatar asked Jul 11 '18 12:07

Abhay Saraf


1 Answers

It looks like it was a propagation issue. The CDN endpoint started working fine after 30 mins.

like image 141
Abhay Saraf Avatar answered Oct 27 '22 21:10

Abhay Saraf