1

我有一个我们公司的内部网络,在其中一台服务器上我有 XAMPP/Apache 设置并有我自己的网站。

我通过输入以下地址从网络中任何地方的浏览器访问该页面:

http://10.10.239.306/MyPage/testpage.php

我正在尝试进行更改,以便用户可以输入而不是 IP(很难记住),例如:

http://hweb/MyPage/testpage.php

我按照在线说明在托管页面的服务器上进行了以下更新:

C:\Windows\system32\driver\etc\host我添加的文件中:

127.0.0.1 hweb

C:\xampp\apache\conf\extra\httpd-vhosts.conf我添加的文件中:

<VirtualHost *:80>
    ServerName hweb
    ServerAlias myname
    DocumentRoot c:/xampp/htdocs/MyPage
</VirtualHost>

当我http://hweb/MyPage/testpage.php在浏览器中输入时,出现Internet Name Resolution Error (dns_server_failure)错误

我确实重新启动了 Apache 服务器两次。

有谁知道我做错了什么以及如何解决?

4

2 回答 2

1

尝试更改监听 127.0.0.1 hweb,检查以下链接; http://sustainablewebdesign.com/book/resources/xampp/

于 2013-10-31T14:15:53.080 回答
1

Internet Name Resolution表示您的浏览器不知道hweb. 即您没有编辑hosts客户端计算机上的文件(试图访问的那个)

请验证您已10.10.239.306 hweb客户端C:\Windows\system32\driver\etc\host计算机上。

于 2013-10-31T14:16:16.513 回答