question

samuresin avatar image
0 Votes"
samuresin asked BevanJohn-6058 commented

Hosting multiple static websites on Azure Blob Storage

I currently host a static web app on Azure Blob Storage which uses an SSL cert that I have on Azure Key Vault -- see picture below.

62498-screenshot-2021-02-01-094009.png

My question is hosting second and third static web apps -- which will also have their own SSL certs coming from Azure Key Vault. Do I need separate storage accounts for each static website I want to host on Azure Blob Storage?

All the files come from $web container and I'm not sure if there's a way to pull web site content from another container on Azure Blob Storage.


azure-storage-accountsazure-blob-storage
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

deherman-MSFT avatar image
2 Votes"
deherman-MSFT answered samuresin commented

@samuresin
You should create a separate Azure Storage Account for each static website. For more information please refer to the documentation here.

Hope this helps. Let us know if you have further questions or issues.



Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you for your help!

0 Votes 0 ·
GuillermoSanchez-6338 avatar image
0 Votes"
GuillermoSanchez-6338 answered BevanJohn-6058 commented

Can I add subfolders in the $web to act as a different static page?

as in:
$Web
- index.html
- stylesheet.css
- ...etc
- subfoder
--index.html
--stylesheet.css
--...etc

So I can reach one state site from $web/index.html and the second from $web/subfolder/index.html, if it is possible how can I reach the subfolder index.html?

Thank you





· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

You can - but they behave as subfolders on a website, rather than behaving like distinct websites (i.e. you wouldn't be able to create different hostnames for each site and have the subfolders appear as the root of that site; rather all hostnames setup would target the same root folder, and would have identical content.

It is possible to work around that; e.g. by using something like the CDN's rule's engine or Application Gateway's listeners & redirects... but it would be a clunky solution.

Currently it's best to use a separate storage account per site. I believe costs are based primarily on transfers and used storage capacity; so unless you'd hoped to have sites share a common resources subfolder (e.g. if all sites used the same stylesheets) there should be no cost difference between your approaches (I think... there are all sorts of bits of config that will incur extra costs, so I may have missed something; but certainly it should be pretty cheap).
https://azure.microsoft.com/en-gb/pricing/details/storage/blobs/

0 Votes 0 ·
AlanGault-2648 avatar image
0 Votes"
AlanGault-2648 answered

I have the same question as Guillermo.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

samuresin avatar image
0 Votes"
samuresin answered AlanGault-2648 commented

@GuillermoSanchez-6338 @AlanGault-2648 Yes, you can have subolders within $web. You can think of it as the root directory of your website.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.