多个域到单个站点和IIS7中的IP
我可以使用的服务器只有 1 个可用 IP,并且我正在尝试托管多个域/应用程序。由于已知 DNS 记录不允许子目录,因此必须通过 IIS 处理。我在网上找到了一些关于这个主题的信息,但没有任何关于 IIS 7 的可靠信息。
根据我的阅读,这可以通过使用 HTTP/主机头来优雅地实现。我想避免使用重定向或 URL 重写。如果您熟悉此主题或其他解决方法,并且可以提供一些有关设置的说明,我们将不胜感激。
谢谢!
The server I have at my disposal has only 1 IP available and I'm trying to host multiple domains/applications. As known DNS records will not allow sub directories, so this has to be handled through IIS. I found some information online about this topic but not anything solid for IIS 7.
From what I've read this can be achieved elegantly through the use of HTTP/Host Headers. I'd like to avoid using redirects or URL Rewriting. If you're familiar with this topic or other workaround and can provide some instructions on settings this up it would be highly appreciated.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在 IIS 7 中的绑定下指定主机名。请注意,您无法使用 HTTPS 绑定来执行此操作。
在您的情况下,您可以选择 IP 地址(或将其保留为“全部未分配”),并为您的主机名输入它,例如“mysite1.com”。在不同的网站中,执行相同的操作,但使用该主机名,例如“mysite2.com”。
You can specify a host name under the binding in IIS 7. Note that you cannot do this with HTTPS binding.
In your case, you would select the IP address (or leave it as All Unassigned), and for your host name enter it, such as "mysite1.com". In a different website, do the same thing except use that host name, such as "mysite2.com".