First, how to upload a file to blob root? It seems I have to upload file to a container (which is a folder IMO)
Second, if I finally found a way to upload file to root, will default.html page (or other name) become the default page for the domain?
Thanks.
Configure static website hostingOpen the Azure portal in your web browser. Locate your storage account and display the account overview. Select Static website to display the configuration page for static websites. Select Enabled to enable static website hosting for the storage account.
By default, the URL for accessing the Blob service in a storage account is https://<your account name>. blob.core.windows.net. You can map your own domain or subdomain to the Blob service for your storage account so that users can reach it using the custom domain or subdomain.
There is a container named: $root. Refer to 'Working with the Root Container' for further info
AFAIK, blob storage cannot be used as a simple web server, so it cannot serve default.html. You will need a web role instance for this.Windows Azure Web, Worker, and VM roles demystified
There's a special container name, $root
, that you use for writing to the root container. See this MSDN article for more information about this root container.
While you can store static web content in blob storage, there's no concept of a default object; that is, you can't have something like default.html be served when a visiter heads over to www.YourStaticSite.com. They'd need to visit www.YourStaticSite.com/default.html.
EDIT: As @SantiagoIT mentioned, you need to host your default page somewhere (such as a Web Role). Since you can move static content to blob storage (e.g. css, javascript, images, and static html), this will reduce the load on your Web Role instances (since requests to blob storage go directly to blob storage, bypassing your Web Role instances altogether). Even if your website is hosted on-premises, you could take advantage of blob storage, yielding the same advantages.
Going one step further: once content is in blob storage, you can choose to activate the CDN (edge cache). For frequently-accessed content, this could yield a performance gain for your end-users.
Others have noted the $root container and also that there is currently no concept of a default blob.
I agree that it would be super useful to suport a default blob for each container including the root container.
I have an open feature request on this. http://feedback.azure.com/forums/217298-storage/suggestions/1180039-support-a-default-blob-for-blob-storage-containers#comments
One of the motivations to add $root folder to blob storage was to support Silverlight's clientaccesspolicy.xml file as explained in MSDN documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With