如何在同一个IIS上托管多个应用程序 [英] how to host multiple applications on the same IIS

查看:304
本文介绍了如何在同一个IIS上托管多个应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在同一个IIS上托管多个应用程序.问题是我需要使用相同的URL,例如www.example.com,但使用不同的目录.此外,端口必须为80,或者至少对最终用户透明,因此我想使用类似他的端口:

www.example.com/app1

www.example.com/app2

问题是IIS不允许我使用相同的域和相同的端口创建2个站点,并且在可能的情况下我不想使用子域.

这两个应用程序不应位于同一站点,因为它们是具有不同维护计划的独立应用程序.

有没有办法做到这一点?还是我必须使用子域?

I would like to host multiple applications on the same IIS. The problem is I need to use the same URL like www.example.com, but different directories. Also the port needs to be 80, or at least transparent to the end user, so I''d like to have something like his:

www.example.com/app1

www.example.com/app2

The problem is IIS does not let me create 2 sites with the same domain and the same port and I don''t wanna use subdomains if possible.

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

Is there a way to do this? Or do I have to use subdomains?

推荐答案

请参阅此
http://weblogs.asp.net/owscott/archive/2010/01/26/iis-url-rewrite-hosting-multiple-domains-under-one-site.aspx [
see this
http://weblogs.asp.net/owscott/archive/2010/01/26/iis-url-rewrite-hosting-multiple-domains-under-one-site.aspx[^]


从HTTP服务器的角度来看,"www.example.com/app1"和"http://www.example.com/app2" 不是不同的应用.您总是可以轻松地做到这一点.

不同的域或子域,不同的架构(使用HTTPS代替HTTP)或不同的服务器可能会有所不同,这也是可能的,请参见Uma的回答.

—SA
From the standpoint of the HTTP server, "www.example.com/app1" and "http://www.example.com/app2" are not different applications. You can always do it with no hassles.

Different domain or sub-domain, different schema (HTTPS instead of HTTP) or different is what can make a difference for a server and this is also possible, please see the answer by Uma.

—SA


这篇关于如何在同一个IIS上托管多个应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆