On the Microsoft Azure platform, we can easily and quickly create our own static website. Maintaining such a website is also very cheap. The created website has an automatically built-in TLS certificate from Microsoft. I have many ideas, where I automatically change the html file with a script, and the displayed content of the website changes immediately.
Today’s article is also available with English subtitles on YOUTUBE.
We create resources for maintaining our website with just a few clicks. We create a storage account of the ‘StorageV2’ type. The rest of the options are not important, we can choose them according to our preferences. If we choose LRS over RA-GRS, the resources will be cheaper and the end result will be one access point instead of two as in my case.
Once we have created our Storage Account, select “Static website” from the settings and click “Enabled“. Then we give the name of the html file that will be displayed on the page. Optionally, we can provide the path to the error file.
When we clicking on the “Save” button, the address of our website will be shown. We will also be informed that a container named $web has been created to store the files of our static website.
Creating a website
We have prepared resources for our website on Azure. So let’s upload the content and make it work. Let’s save in the $web container, a simple file named index.html and the contents, for example:
<html> <head> <title>Static Website Lepczynski.it</title> </head> <body bgcolor="#f1f1f1" text="Red"> <h1>Static Website Lepczynski.it</h1> Here is the content of your site. </body> </html>
When we go to the address of our website, we should see this simple website:
Of course, we can insert something a little more complicated here, such as:
For those interested, this is a free github template that you can find at https://github.com/cloudacademy/static-website-example. As for me, it works great and it's fun to click on its subpages.