我有一个我们公司的内部网络,在其中一台服务器上我有 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 服务器两次。
有谁知道我做错了什么以及如何解决?