Azure Static Website Hosting

心已入冬 提交于 2019-12-01 15:49:26

UPDATE: 29-June-2018

It is now possible to host static websites in Azure Storage. You can read more about it here: https://docs.microsoft.com/en-gb/azure/storage/blobs/storage-blob-static-website


As of today, no. Azure doesn't have an equivalent of that. You can however host static sites as Web Apps and for free as well if you're comfortable with the restrictions with free tier.

It's not officially supported, but if you hosted your site in Azure Blob Storage's root container and made the container publicly accessible, you could probably achieve the same affect. You can even give the blob storage account a custom domain name.

Only downside is that you'll have to figure out a good deployment story. Two of your options are to use an FTP-like client such as CloudBerry to manually deploy your site, or write your own deployment script using the blob storage api

Kirsten Greed

I found a way to host a static website in an Azure blob, using a subdomain and an http re-direct

I do the following

1) In Azure I create a storage account with a container ( called docs ) that has Blob access policy.

2) I upload my static website to the docs container using the storage explorer. This includes some PHP files in a sub folder.

3) In the DNS I set up a cname record for a subdomain ( called info say) with alias myblob.blob.core.windows.net ( where myblob is the name of my blob)

4) In the DNS I create an Http redirect for record to a file on the subdomain for www with url http://info.mydomainname.com/docs/index.html

5) In Azure I create a custom domain for info.mydomainname.com

My website then works however if someone knows the location of the PHP files then they can download them which means I must not store secrets in them.

I have asked if there is a work around here

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!