WAMP 中的本地主机不起作用 [英] localhost in WAMP not working

查看:34
本文介绍了WAMP 中的本地主机不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 WAMP 2.2.已安装,iso 为绿色.问题是,当我在 URL 中输入 locahost 时,它不起作用但是当我输入 127.0.0.1 时它可以工作.

i use WAMP 2.2. installed and the ison is green. problem is the , when I enter locahost in URL , it doesn't work but when I enter 127.0.0.1 it works.

是什么原因?

推荐答案

可能是:

A.您的 Windows 主机文件没有此条目:

A. Your Windows Hosts file does not have this entry:

127.0.0.1 localhost

B.或者这个条目是第一个(在上面的之前),而 Apache 只监听 IPv4:

B. Or this entry is 1st (comes before the above), and Apache is Listening on IPv4 only:

::1 localhost

在第二种情况下,只需删除或注释掉条目即可.

In the second case, just remove or comment out the entry.

主机文件路径:

C:Windows\system32\drivers\etc\hosts

您需要通过记事本上的以管理员身份运行"编辑主机文件.

You'll need to edit Hosts file via 'Run as admin' on Notepad.

这篇关于WAMP 中的本地主机不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆