Static website hosting in Azure blob storage
This would require supporting default file to render and somekind of redirect from root to a particular container.
Thank you for your feedback. We are currently in public preview of static website hosting for Azure Storage to enable this scenario. Check out the blog post here for more details: https://azure.microsoft.com/en-us/blog/azure-storage-static-web-hosting-public-preview. The feature set includes support for default documents and custom error documents for HTTP status code 404.
For any further questions, or to discuss your specific scenario, send us an email at firstname.lastname@example.org.
Jason Turner commented
This would include the original URL as well so the above mentioned files can be tracked. It would also allow for timing out of SAS tokens and re-authenticating/re-issuing.
At the moment we have to deploy a separate app to be able to do this and it's just a pain to manage...
This would be great if you have links to a download that is no longer available and you want to serve something other than the ****** xml message. Would just as cool if it was a redirect handler to any url you wanted if it was coming from a browser/public
I love your idea. Thank you. I hope someone at Windows Azure team my get excited about it as well.
One of the most underrated features! Great job!
Andy Booth commented
Another suggestion would be when routing to a the root url, it fallbacks on whatever you specify image or .html
several others have made this suggestion too...
This is the exact problem I am facing, I would love to use azure cdn to cache dynamically created images (scaled or otherwise transformed version of an original). After the first request failing a custom 404 handler could create the image & add it for the next request.
Yingwei Yang commented
there is another feature same as this one: http://www.mygreatwindowsazureidea.com/forums/34192-windows-azure-feature-voting/suggestions/1180039-support-a-default-blob-for-blob-storage-containers?ref=title
is there a way to merge the two and add up the vote?
Tan Silliksaar commented
Peter Reid commented
A custom 404 handler for Blob Storage would enable me to build a "content pull" model for the CDN. A request for content from the CDN goes back to Blob storage, if its not there then a custom 404 handler will grab the content from the source content system. Very powerful feature
Jeff G. Young - jeffcodes.net commented
From my forum post:
Since there is a "trick" to create blobs in the root of a storage account ("$root"), I was hoping there was a trick to create a default document for a blob container. Maybe "$default" or something like that?
I would like to serve requests at the root of the storage account with a particular blob. So, if I used a CNAME record to map www.mydomain.com to mydomain.blob.core.windows.net, then requests to http://www.mydomain.com could retrieve this default blob.
The scenario I want to enable is CDN caching of the first page hit for a site, which will be a very small bootstrapping page that puts up a loading indicator then pulls more CDN cached data as well as live data from my windows azure web role. But I need to support http://www.mydomain.com alone, not just http://www.mydomain.com/index.htm.
And of course, using any kind of redirect to get to http://www.mydomain.com would seriously undermine the value of this scenario.
If this feature doesn't exist, I suggest it should.
Jeff G. Young @jeffcodes http://jeffcodes.net
I agree. S3 just added support for root documents. We need it too! I need to be able to put index.html (or index.htm) on my site and avoid having to type it into the URL.
Ameer Deen commented
I saw this idea: http://www.mygreatwindowsazureidea.com/forums/34192-windows-azure-feature-voting/suggestions/410922-support-root-blobs?ref=title and voted for that one instead. Turns out yours is the same. Can you vote for the other one as well since it's 91st ranked now ?
Chris Auld commented
Blob storage is, in effect, a big massive scale static web server. THis makes it very suitale for directly serving certain types of static web sites that may be hit by a big spike in load. The one statis web server feature missing that is really hard to work around is a lack of a default document.
It should be possible to set a single blob in each container as the default blob and this should be returned if the HTTP GET request provides only the container name.
Michael Khalili commented
Right now the system sends xml to the user if a file isn't found. This isn't very friendly to someone browsing from the web. I would like to have a redirect to a custom url for 404 errors instead of xml.
I can see the need for the xml when using the API so perhaps the redirect can be turned off when making the API calls.
This is also important so I can track when files are missing.