Multiple sites in IIS7 with the same URL and port, but in different directories

I would like to host multiple applications in the same IIS. The problem is that I need to use the same URL as www.example.com, but different directories. Also, the port should be 80 or at least transparent to the end user, so I would like to have something like this:

www.example.com/app1

www.example.com/app2

The problem is that IIS does not allow me to create 2 sites with the same domain and the same port, and I do not want to use subdomains, if possible.

Both applications should not be on the same site, since they are separate applications with different schedules.

Is there any way to do this? Or do I need to use subdomains?

+4
source share
4 answers

If you have the app1 and app2 directories in the inetpub/wwwroot and configure both of them as applications, it should have the desired effect. Hope this helps ...

+6
source

Have you considered using virtual directories? These directories can use different application pools and therefore have different service schedules.

0
source

Another option besides the recommendations above is to use URL rewriting so that IIS translates incoming URLs.

http://learn.iis.net/page.aspx/460/using-the-url-rewrite-module/

0
source

The question is too old, but I am running the same issue.

Anirud Ramanathan's answer is correct.

The solution is to add a new application in different ApplicationPools.

To the right of the Microsoft documentation:

In the Connections panel, expand nodes.

Right-click the site for which you want to create an application, and click Add Application.

In the Alias ​​text box, enter a value for the application URL, such as marketing. This value is used to access the application in the URL.

Click Select if you want to select a different application pool than the one specified in the Application Pool field. In the Select Application Pool dialog box, select an application pool from the Application Pool list and click OK.

In the "Physical path" text box, enter the physical path to the application folder or click the browse button (...) to go to the file system to find the folder.

If necessary, select Connect to specify credentials that have permission to access the physical path. If you are not using specific credentials, select the User Account (Pass Through Authentication) option in the Connect As dialog box.

If necessary, click Check Settings to check the options specified for the application.

Click OK.

Full documentation here

NB: "click" Test Settings "to check the settings that you specified for the application" may result in an error. According to other SO answers, this seems like a mistake. I ignore this warning and everything works well.

0
source

All Articles