How to create virtual applications / folders with Azure Resource Manager management templates?

I am trying to create an ARM pattern to exclude multiple instances of our fairly simple web application product.

I am trying to add a virtual application to my web application. i.e. something like this: -

Web application virtual folder

But I can not find the right JSON to achieve this. I found the following example online, but it has no effect.

(by properties for the web application)

"virtualApplications": [ { "virtualPath": "/", "physicalPath": "site\\wwwroot" }, { "virtualPath": "/virtualApp", "physicalPath": "site\\wwwroot\\virtualApp" } 
+5
source share
1 answer

Settings are in the web configuration. Therefore, in your ARM template, you just need to add another resource (next to the site resource) as follows:

 { "apiVersion": "2014-06-01", "name": "web", "type": "config", "dependsOn": [ "[concat('Microsoft.Web\/sites\/', parameters('siteName'))]" ], "properties": { "virtualApplications": [ { "virtualPath": "\/", "physicalPath": "site\\wwwroot", "preloadEnabled": false, "virtualDirectories": null }, { "virtualPath": "\/virtualApp", "physicalPath": "site\\wwwroot\\virtualApp", "preloadEnabled": false, "virtualDirectories": null } ], // other web config settings ie "phpVersion": "5.4" } } 
+6
source

Source: https://habr.com/ru/post/1236624/


All Articles