Gustavo Piucco
Gustavo Piucco

Reputation: 557

How wwwroot folder managed by Azure Web Sites?

Where does the wwwroot folder go when I use "Publish" inside Visual Studio to deploy to Azure Web Apps?

When new instances are created, where does wwwroot folder comes from?

Is wwwroot referenced inside Azure Storage or is it in the local storage of each instance?

How to serve wwwroot files from Azure CDN instead of serving from Azure Web Apps?

Upvotes: 2

Views: 9049

Answers (1)

juunas
juunas

Reputation: 58823

As described here in the Kudu docs: https://github.com/projectkudu/kudu/wiki/Understanding-the-Azure-App-Service-file-system:

The storage is shared across your instances. Azure Storage is used behind the scenes for this.

The storage is also persistent.

As for setting up the CDN to serve files from your Web App, you can refer to documentation here: https://learn.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-content-delivery-network?toc=%2fazure%2fcdn%2ftoc.json.

If you setup the origin hostname as yourapp.azurewebsites.net, then content that would be accessed via yourapp.azurewebsites.net/myimage.png can then be accessed via CDN from yourcdn.azureedge.net/myimage.png.

Upvotes: 2

Related Questions