我已经安装了wamp 2.5和apache 2.4.9。我在www文件夹中添加了一个简单的php文件。当我尝试从localhost访问它时,我收到以下消息:
The server at main can't be found, because the DNS lookup failed. DNS is the
network service that translates a website's name to its Internet address. This
error is most often caused by having no connection to the Internet or a
misconfigured network. It can also be caused by an unresponsive DNS server or
a firewall preventing Google Chrome from accessing the network.
DNS查找失败问题的解决方案是什么?我正在使用Windows 7.
答案 0 :(得分:1)
通过输入http://main/
,您似乎正在尝试访问该网页。问题是Google-Chrome会尝试解析域main
,但由于它不存在而失败。
一种解决方案是将main
域hosts
添加到C:\Windows\System32\Drivers\etc\hosts
中的ServerName
文件,提供更详细的帮助here。
更好的方法是检查您在Apache中使用{{1}}指令配置的服务器的名称,并尝试使用它。