【问题标题】:unable to access localhost outside my computer无法在我的计算机外访问本地主机
【发布时间】:2014-10-13 12:11:32
【问题描述】:

我在 webmatrix 上使用 php 创建了一个代理。在我的本地机器上,我可以使用

访问该网站

//localhost:1136/Tools.php?arg1="test"

但是,当我尝试提供实际的机器名称(带域)时,我得到 "Bad Request: Invalid Host Name" 。这甚至发生在我的本地机器上。即当我用机器名(域)替换 localhost 时

我尝试了什么?

我通过为我的网站设置别名修改了 IISExpress 中的 applicationhost.config

<site name="EmptySite2" id="7">
                <application path="/">
                    <virtualDirectory path="/" physicalPath="C:\Users\xom\Documents\My Web Sites\EmptySite2" />
                </application>
                <application path="/alias">
                <virtualDirectory path="/" physicalPath="ABCD.xxx.xx.com" />
                </application>
                <bindings>
                    <binding protocol="http" bindingInformation="*:1136:localhost" />
                </bindings>
            </site>

【问题讨论】:

    标签: web-services iis webmatrix


    【解决方案1】:

    • 修改 C:\Users\\Documents\IISExpress\config\applicationhost.config 上的应用程序主机 • 定位站点 • 将绑定协议中的 localhost 替换为您的机器名

    \Documents\我的网站\EmptySite2" /> " />

    【讨论】:

      猜你喜欢
      • 2015-01-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-23
      • 2021-12-27
      • 1970-01-01
      • 2020-07-12
      相关资源
      最近更新 更多