How to Host a Static Website on Blob Storage

How to Host a Static Website on Blob Storage

In this article, you will learn the procedures to hosting a STATIC WEBSITE on Azure Blob Storage.

The followings are prerequisites to hosting a static website on Azure blob storage;

  1. An Azure Account Login.

  2. An Azure Subscription.

  3. Azure Storage account.

    Login to your azure account first, Search for a storage account and Click on Create as shown below.

Follow the procedures prompted .

After successfully creating your storage account in Azure, Open the newly created Azure storage, and Select Static Website and click. This is where your website will reside. So, Lets set it up.

Click on Enabled. This will Enable access to the website created.

The Index path and the Error Path will be define here when you enable the static website.

The webisite you wish to host has an index(index.html) and error path(error.html)

Type these two name paths in the space provided above and Save your updates.

You can choose to configure your website further in the Configuration menu below

At default, all the configuration had been set to enabled.

Download the static Website you want to host on your system and extract if Zip and name it.

You need to VS Code Working on your System. If you dont have one, try and download it. Search online and download.

Open your VS Code app and upload the website file downloaded. the extracted version.

Ensure that Azure Subscriptions,Azure Subscriptions and Azure Storage are added to your visual Studio Code.

Open the Downloaded website in the Visual Studio App and do all your edits as stated above in the picture and save.

Check the Storage, you will see the storage you created in your Azure account.

If you have not login to your azure account, you wont be able to see the Storage account created.

You will get the above website after debug and deploy the website

In the VS Code editor, Select the Storage account created in Azure and Select Deployed to Storage account.

Deployement is ongoing which will take about 3-5 mins

By so doing, you will successfully deploy the static Website to Azure Storage.

To view your static Website, click on browse to static website and the website image below will be displayed

The above website was successfully hosted and deployed to Azure Storage and can be access world wide via the link lekestorageaccount1.z6.web.core.windows.net unless storage account is deleted which will thus prevent all access to the website.

Subcriptions too can prevent access to the static website. If Sub ended.

Next, you will learn how to Attarch a virtual network to a virtual machine