【发布时间】:2017-06-23 17:58:42
【问题描述】:
我使用 Visual Studio 2013 和 IIS 10。
通常当我在开发 Orchard 网站时,我会通过在我的 Windows 主机文件中添加一个别名然后在 IIS 中为该别名添加一个绑定来在本地对其进行测试,例如
主持人:
127.0.0.1 mysite
IIS:
Type | Hostname | Port
------------------------------
http mysite 80
当我想在不同的设备上进行测试时,我会在 IIS 中为网站添加一个任意端口的绑定,例如 666,而无需指定主机名。然后我打开该端口,这样我就可以通过本地网络上的手机或平板电脑浏览到http://mycomputer:666 来访问它。或者,如果我想将其展示给其他人,我可以使用 ngrok 获取该端口的临时公共 URL。
但是我怎样才能获得一个端口来将我带到在同一网站下运行的租户呢?
主持人:
127.0.0.1 mysite
127.0.0.1 mytenant
IIS:
Type | Hostname | Port
------------------------------
http mysite 80 // I can reach the master locally at http://mysite
http mytenant 80 // I can reach the tenant locally at http://mytenant
http 666 // mycomputer:666 takes me to mysite
// How to get it to take me to mytenant?
http mytenant 666 // This doesn't work, invalid hostname error
【问题讨论】:
标签: iis orchardcms