Azure Blob Storage is a cloud-based storage solution provided by Microsoft Azure, designed to handle large amounts of unstructured data. "Blob" stands for Binary Large Object, which refers to data like text, images, videos, documents, logs, backups, and other file types that don't follow a fixed schema.
Hosting a static website on Azure Blob Storage is an efficient and cost-effective way to serve static content such as HTML, CSS, JavaScript, and images.
Here's a step-by-step guide
Step 1: Create a Storage Account
- Log in to the Azure Portal.
- Navigate to Storage accounts and click + Create.
- Configure the settings
Subscription: Select your subscription.
Resource group: Choose an existing group or create a new one.
Storage account name: Enter a globally unique name.
Region: Choose a region near your audience.
Performance: Choose Standard (default) for cost-effective storage.
Redundancy: Select redundancy based on your needs
Click Review + Create and then Create.
- Deployment complete then click on go to resource
Step 2: Enable Static Website Hosting
- Open the newly created storage account in the Azure Portal.
In the left-hand menu, find and click Static website under the Data management section.
Enable Static website.
Specify the index document name (e.g., index.html).
Optionally, specify an error document path (e.g., 404.html).
Save the changes.
This action generates a Primary endpoint URL where your website will be accessible.
Step 3: Upload Your Website Files
Navigate to the Containers section in your storage account.
You’ll see a container named $web (created automatically for hosting).Click on $web and upload your static website files:
Click Upload.
Drag and drop your files or select them manually.
Ensure your files include the index.html file and other required
assets.
Step 4: Test Your Website
Access the Website
Open the primary endpoint URL in a browser to view your website.
- Paste in a browser
By following these steps, your website WILL be live and accessible via Azure Blob Storage
Thanks
Top comments (0)