0

I would like to deploy several web applications to one Azure App Service to dedicated Virtual directories. For example:

WebApp1 to site\wwwroot\app1

WebApp2 to site\wwwroot\app2

How can I do this using Azure Resource Manager Template??

1 Answer 1

1

Your ARM template for Azure Web App on dedicated virtual directory should look like below:

   {
      "apiVersion": "2015-08-01",
      "name": "parameters('WebApp1')",
      "type": "Microsoft.Web/sites",
       ...
      "resources": [
        {
          "apiVersion": "2015-08-01",
          "name": "web",
          "type": "config",
          "dependsOn": [
            "[resourceId('Microsoft.Web/Sites', parameters('WebApp1'))]"
          ],
          "properties": {

            "virtualApplications": [
              {
                "virtualPath": "/",
                "physicalPath": "site\\wwwroot"
              },
              {
                "virtualPath": "/WebApp1",
                "physicalPath": "site\\wwwroot\\app1"
              },
            ]
          }
        }
    }

You can also reference to this complete sample ARM template.

Hope this helps!

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

Comments

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.