Is it possible to deploy multiple web applications to a single Linux Web app??

Surya maroju 1 Reputation point
2020-08-31T14:12:45.047+00:00

Hi All,

We have a scenario where the my two applications -
app1 requires three war files to be deployed to run on the web app.
app2 requires a single war file to run.

When I deployed app1 with 3 war files onto the web app, it created three folders for 3 war files in the wwwroot/webapps/ directory.

Now the folder structure will be:

wwwroot/webapps/folder1
wwwroot/webapps/folder2
wwwroot/webapps/folder3

and now I want to deploy the app2 war file onto the same web app but it should not create another folder in the above directory.

As I am using Linux web app, path mapping of virtual application option is not available.

there is any other way to do this?? by avoiding the additional folder creation?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,866 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. sadomovalex 3,626 Reputation points
    2020-08-31T15:19:15.387+00:00

    not sure is it possible without creation of additional folder. If go with additional folder - you may try to create app-level folders:
    wwwroot/webapps/app1
    wwwroot/webapps/app2
    and put content under them. But in this case urls of your web apps will be changed from http://example.com to http://example.com/app1 and http://example.com/app2. If you need own domain names for both apps it may be fixed by url rewrite (http://example.com/app1 -> http://example1.com, http://example.com/app2 -> http://example2.com) e.g. like described here: http Redirect an azure web application.

    2 people found this answer helpful.
    0 comments No comments

  2. brtrach-MSFT 15,251 Reputation points Microsoft Employee
    2020-08-31T16:29:03.49+00:00

    @Surya maroju This scenario came up two weeks ago in our meeting with the web apps product group. Their response was that running multiple sites in a single web app was not officially supported. As @sadomovalex pointed out, there might be unofficial methods to achieve this but as with anything unofficial, you run the risk of it breaking in future updates as it's not a scenario that will be validated during testing.

    You can run multiple web apps in a single app service plan at no additional costs., which was the recommended approach by the product group.

    1 person found this answer helpful.
    0 comments No comments