0

我在 Windows 机器的 /etc/hosts 文件中设置了多个主机。我的问题是我无法在 IE 浏览器中访问 /etc/hosts 文件中的任何主机条目。但我可以在除 IE 浏览器之外的所有其他浏览器中访问主机。

我的主机文件如下所示:

127.0.0.1       localhost
127.0.0.1       apache.local.com
127.0.0.1       iis.local.com

如果我在 IE 浏览器中使用apache.local.comiis.local.com,它只会永远加载,但在其他浏览器中它加载正常,并将我带到 wamp 服务器本地主机页面。

ping 这些主机看起来不错

ping apache.local.com

C:\Windows\system32>ping apache.local.com

Pinging apache.local.com [127.0.0.1] with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Ping statistics for 127.0.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

ping iis.local.com

C:\Windows\system32>ping iis.local.com

Pinging iis.local.com [127.0.0.1] with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Ping statistics for 127.0.0.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

这看起来很奇怪,因为其他浏览器工作正常,但只有 IE 确实存在它永远加载的问题。

我尝试重置 IE 浏览器并刷新 DNS 条目并重新启动机器几次,但仍然无法正常工作。

我的系统是Windows8 64 位,安装了wampIIS,并安装了 PHP 和 MySQL 扩展。

有人能帮忙吗?

4

3 回答 3

0

I was able to resolve the issue. I see that if I start IIS server and visit the hosts in IE browsers everything worked fine. The issue happens only when I start Apache and browse on to that hosts.

My Apache version was 2.4.4. I switched to Apache 2.2.2 and everything worked fine. I think it would have been an issue with Apache 2.4.4. But I am still confused of the fact that it worked in other browsers, the issue was only with IE browsers.

Anyway switching on the Apache version did the trick for me.

Thanks for all your help :)

于 2013-07-10T18:11:30.933 回答
0

您可以尝试以下步骤,注意以下事实 *

重置会将 IE 重置为出厂设置。您将丢失现有的配置以及 IE 中的任何设置或数据。从您对该浏览器的喜爱来看,我假设其中没有您关心的任何数据。;) 但是,在执行这些步骤之前,请确保您对此感到满意

*

脚步 :

  • 打开工具 -> Internet 选项
  • 单击“高级”选项卡。
  • 点击“重置”
  • 点击“删除个人设置”复选框
  • 在“重置 Internet Explorer 设置”对话框中,单击“重置”。
  • 更改完成后,单击“关闭”,然后重新启动浏览器。
于 2013-07-10T13:18:24.610 回答
-1

IPv6 可能是您想在此处查看的内容:https ://superuser.com/questions/433258/ipv6-local-address-in-hosts-file

可能是 IE 正在寻找 IPv6,而其他浏览器正在使用传统的 IPv4。

于 2013-07-10T15:05:24.330 回答