问题描述
几年来我一直在使用wamp,几个月前我又升级到了Windows,直到昨天我的wap都能正常工作.但是现在无法使用localhost访问它.但是,当我尝试使用127.0.0.1时,它可以正常运行.我在主机文件中将 :: 1 localhost 更改为 127.0.0.1 localhost .在大多数网站中,针对该问题的解决方案都在哪里提出.但不幸的是,它对我不起作用.当我 ping本地主机时,它显示的是从:: 1:时间重放.而且没有软件正在使用端口80,我已经对其进行了检查.请帮助解决此问题.
I am using wamp for few years and i upgraded to windows 8 few months before, my wamp working smoothly up to yesterday. But now it can't be accessed using localhost. but when i trying 127.0.0.1 instead it works smoothly. I changed ::1 localhost to 127.0.0.1 localhost in host file. which where the solution suggested for this problem in most websites. But unfortunately its not work for me. When i ping localhost its showing replay from ::1: time<1ms. And There is no software's using port 80 i already checked it. please help to solve this.
推荐答案
修改
%SystemRoot%\system32\drivers\etc\hosts
并替换
::1 localhost
与
127.0.0.1 localhost
保存并重新启动apache.希望它能工作.
Save and restart apache.Hope it will work .
这篇关于127.0.0.1可以访问/正在工作,但是localhost无法访问/不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!