I’m deploying two web applications to a single Azure App Service. I’m targeting the same App Service from two different deployment projects in OD. I’m attempting to host one application as a virtual application under the other but cannot seem to configure the relevant virtual applications and directories in a way that is compatible with my OD deployments.
Ideally I would like:
-
“Site A” to be hosted at:
http://{my-app}.azurewebsites.net
, and -
“Site B” to be hosted at:
http://{my-app}.azurewebsites.net/site-b
.
For each deployment project I want to enable the “Remove additional files” and “Preserve App_Data” options. I therefore want each site to deployed to sibling directories, since I cannot have “Site B” in a sub-directory of “Site A”, since the deployment of “Site A” would delete the deployed files for “Site B”.
In order to attempt to achieve the above configuration, I’ve attempted to configure the relevant virtual applications and directories in my Azure App Service, as per the attached screenshot.
In the deployment process for “Site A”, I’ve entered “site-a” as the “Physical path” for this “Deploy an Azure Web App” step.
In the deployment process for “Site B”, I’ve entered “site-b” as the “Physical path” for this “Deploy an Azure Web App” step.
However, when I come to deploy “Site A”, it gets placed into the folder site\wwwroot\site-a\site-a
(note the double site-a
). When I come to deploy “Site B”, it gets placed into the folder site\wwwroot\site-a\site-b
(not the intended directory, as I don’t want this to be a child of site-a
.).
If I leave the “Physical Path” setting as empty for the “Site A” deployment step, then “Site B” still ends up as a child directory of “Site A”.
Are you able to suggest a configuration of OD/Azure or a workaround that would allow me to achieve the scenario described above, namely two deployment steps, in two different deployment projects, targeting sibling directories in an Azure App Service?