2

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.

enter image description here

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.

2
  • what do you mean by this? "which uses SSL cert that I have on Azure Key Vault" Commented Feb 1, 2021 at 16:53
  • It means I access the website through https. If a static website is hosted on Azure Blob Storage and needs to use an SSL cert, the certificate must be stored in Azure Key Vault. So, I'm saying that I want to host multiple static websites which will all have their own SSL certs that are stored in my Azure Key Vault account. Commented Feb 1, 2021 at 17:10

1 Answer 1

4

Do I need separate storage accounts for each static website I want to host on Azure Blob Storage

Yes, you would need to add new storage accounts and create custom domains and SSL certs for each account.

That's why I would propose a different solution:

Use one Azure Front Door, add one (or multiple, if you need to) custom domains to it. Either reference your custom SSL cert from KeyVault or - even better - use the FrontDoor-managed certificates. Then create one storage account and create a new container for each web site you want to host. You dont even need to enable static website for this to work if you just make the containers public-read.

Then add the storage account as a backend/origin in Front Door and different routing rules to the different containers. The routing rules could either be based on the path or, if you add different domain names for each site to Front Door, based on the domain.

Sign up to request clarification or add additional context in comments.

7 Comments

I've never used Front Door but this definitely sounds like a solid solution. How easy/difficult is to get things going with Front Door?
The only thing to wrap your head around is the routing piece. But otherwise it’s really straightforward
One more question if I may: I just checked their pricing. The in and outbound data makes sense but I'm a bit confused about routing rules which are charged hourly. Do you know how this works?
I read this as “if you have up to five rules configured for an entire month (720hrs) those cost you about USD 21 per month
I used this approach to setup multiple static sites in a single Azure Storage account, using a separate container per site. I did this because Azure Static Web apps requires deployment through Git which isn't non-technical user friendly. Deployment through Azure Storage Explorer is simple. I did need to add a routing rule to rewrite all requests to the root / to /index.html I applied this rule across all routes and had each origin do the mapping to the specific container for the endpoint.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.