Search code examples
azureazure-storageazure-storage-files

Azure Storage Static website error - Resource not found or content doesn't exist


To see how static websites work in Azure storage, I created a basic angular app and uploaded the files in dist folder to the static website. But when I try to access the URL, I get a 404 error message that says "The requested content doesn't exist".

Also, I can see that files are present under $web path, but when I click on the file URL <azurestorageurl>/$web/index.html the browser throws an error message "Resource not found".

.enter image description here


Solution

  • The reason you're getting this error is because the ACL of the $web blob container is Private by default.

    Please change the ACL to either Blob (recommended) or Container and you should not see this error.

    UPDATE

    So I reached out to Azure Storage team and brought this question to their attention. They were kind enough to explain the behavior to me.

    Essentially if you access the static website's contents through the static website endpoint (e.g. account.z5.web.core.windows.net), there's no need to change the blob container's ACL. Contents should be accessible even if the ACL of $web is Private. Blob container's ACL comes into picture when you access the content through blob storage endpoint (e.g. account.blob.core.windows.net).