我使用Visual Studio 2013和IIS 10。
通常,当我开发Orchard网站时,我会在本地测试它,方法是将别名添加到Windows主机文件中,然后在IIS中为该别名添加绑定,例如
主机:
127.0.0.1 mysiteIIS:
Type | Hostname | Port
------------------------------
http mysite 80 当我想在不同的设备上进行测试时,我会在没有指定主机名的情况下,在IIS中添加一个任意端口的绑定,例如666。然后我打开那个端口,这样我就可以通过本地网络上的手机或平板电脑浏览到http://mycomputer:666来访问它。或者,如果我想将其显示给其他人,我可以使用ngrok获取该端口的临时公共URL。
但是,我如何才能让port将我带到在同一网站下运行的租户呢?
主机:
127.0.0.1 mysite
127.0.0.1 mytenantIIS:
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发布于 2017-06-23 17:58:43
您可以在主机中设置127.0.0.1 local.site.com & 127.0.0.1 local.tenant.com,然后在IIS中将主机名设置为xxx端口的local.tenant.com
https://stackoverflow.com/questions/44717747
复制相似问题