DEV Community

Cover image for How to host a static website with Azure storage Account
Gbadamosi Tajudeen
Gbadamosi Tajudeen

Posted on

How to host a static website with Azure storage Account

Prerequisite

Install sublime text on your system
Download a static website template file with HTML code (e.g. CeeVee template)

To Enable a Static Website in Azure

Create an azure storage account in your azure portal
Storage account
Click on the static website on the storage account overview
static website in azure
Switch from disable to enable, Enter the index document name as Index.HTML and error document path as error.HTML and save
Enable static website
A container “$web” is automatically created and it is where the web page will be hosted
azure container

To edit the HTML File template

Open the file template with the sublime text
Edit the file template to suit your specification and save.
HTML File
Image of the edited file from the browser.
CeeVee template

To upload the static website HTML file into the $web container

Click on $web container created, click on upload on the top right hand tab to upload the edited file template and Click on upload
Upload to the container
The file is uploaded successfully.
file uploaded to container
The URL generated can be copied to the browser to view the uploaded file and also SAS can be Generated to grant limited access to the storage account for specific period of time.
Generate SAS

Top comments (0)