我正在尝试创建一个ARM模板来删除我们相当简单的Web App产品的多个实例.
我正在努力为我的网络应用添加虚拟应用程序.即是这样的: –
但我找不到合适的JSON来实现这一目标.我在网上找到了以下样本,但似乎没有任何效果.
(在Web应用程序的属性下)
"virtualApplications": [ { "virtualPath": "/","physicalPath": "site\\wwwroot" },{ "virtualPath": "/virtualApp","physicalPath": "site\\wwwroot\\virtualApp" }
解决方法
设置在Web配置下.因此,在您的ARM模板中,您只需添加另一个资源(与站点资源一起),如下所示:
{ "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","virtualDirectories": null } ],// other web config settings i.e. "PHPVersion": "5.4" } }