从IIS中的一个IP运行多个站点 [英] Run multiple sites from one IP in IIS

查看:439
本文介绍了从IIS中的一个IP运行多个站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Windows Server 2008和IIS 7的盒子,我正在使用ASP.NET应用程序。
我试图从一个IP运行多个站点,但我无法从外部访问这些站点。我只能从外部访问默认网站,但是当我想访问第二个时,它不起作用。

I have a box with Windows Server 2008 and IIS 7, and I'm using an ASP.NET app. I am trying to run multiple sites from one IP, but I can't access the sites from the outside. I can only access the Default website from outside but when I want to access the second one it does not work.

第二个应该在 http:// ip:81 上运行,默认值为80。
它们都在盒子上本地运行正常,我在防火墙上添加了一条允许所有入站的规则。

The second one should run on the http://ip:81 and the default one is on 80. They both run fine locally on the box and I have added a rule on the firewall to allow all inbound.

推荐答案

主机标头是您的朋友

host headers are your friend

此链接可能会对您有所帮助。

This link might help you.

http://technet.microsoft.com/en -us / library / cc753195(v = ws.10).aspx

您基本上将在不同的端口上运行您的站点并告诉IIS http:// url1映射到端口80上的站点,http:// url2映射到端口81

You basically are going to run your sites on different ports and the tell IIS that http:// url1 maps to the site on port 80 and http:// url2 maps to port 81

这篇关于从IIS中的一个IP运行多个站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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