localhost in WAMP not working

折月煮酒 提交于 2019-12-13 03:08:06

问题


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.

what is the reason ?


回答1:


Chances are that either:

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

127.0.0.1 localhost

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.

Hosts file path:

C:Windows\system32\drivers\etc\hosts

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




回答2:


You must be using windows 8. Please follow this guide to fix your wamp in Windows 8

How to run WAMP Server on Windows 8

Downgrading to Windows 7 is not a bad option if you are a regular developer.



来源:https://stackoverflow.com/questions/24097396/localhost-in-wamp-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!