apache、localhost 在 Windows 7 中不工作
我在访问本地主机时遇到问题:它似乎无法加载! chrome 说“哎呀!Google Chrome 无法连接到本地主机”,然后给出一些建议,firefox 给出超时错误。就好像他们正在通过互联网寻找本地主机一样。 我也尝试过 127.0.0.1 ,结果相同。 我安装了 Apache,之前我会收到 404 错误。 我通过禁用 SQL 报告服务摆脱了这个问题(我也安装了 MS SQL)。 如果我执行“Wamp 图标>>Apache>>服务>>测试端口 80”,它会显示:
“您的端口 80 并未实际使用”
我还确保
127.0.0.1本地主机
位于“host”文件中。
过去三天以来我一直在试图找出这个问题,但一直找不到答案。
如果有人可以提供帮助,我将不胜感激。 谢谢。
操作系统:Windows 7 旗舰版 x64
i'm having trouble accessing my localhost: it wont seem to load!
chrome says "Oops! Google Chrome could not connect to localhost" and then some suggestions and firefox gives a timeout error. As if they are looking for localhost over the internet.
i have also tried 127.0.0.1 with the same result.
I have Apache installed and earlier i would get a 404 error. i got rid of that by disabling SQL reporting services (i have MS SQL installed aswell).
If i do "Wamp icon>>Apache>>Services>>Test port 80" it says:
"Your port 80 is not actually used"
i have also made sure that
127.0.0.1 localhost
is in the "host" file.
I have been trying to figure out the problem since the past 3 days but havnt been able to find an answer.
I would appreciate if anyone can help.
Thank you.
OS: Windows 7 ultimate x64
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我在 Windows 7 Home Basic 中也遇到了同样的问题。
也许你可以这样解决:
1)你的80端口大部分被微软iis服务器阻塞。因此,如果 iis 使用端口 80,那么 apache 将无法使用该端口。
2)所以,更改apache的监听端口。 apache有一个文件名为httpd.conf,用文本编辑器打开该文件,里面已经写好了80端口,将端口改为8080(大部分人都用8080)。
3)现在你的 Apache 运行在不同的端口上。
4)重新启动apache服务或者重新启动你的wamp服务器。
5) 现在通过
http://localhost:8080
打开本地主机6) 您将看到本地主机页面。
希望它能解决您的问题。
I had the same issue in my windows 7 home basic.
Maybe you could solve by this:
1)Your port 80 is mostly blocked by Microsoft iis server. so if iis is using port 80 than apache wont be able to use the port.
2) So, change the listening port of apache. apache has a file name httpd.conf.Open the file in a text editor and there will be port 80 already written, change the port to 8080 (mostly people use 8080).
3)So now your Apache runs on different port.
4) Restart apache services or restart your wamp server.
5)now Open your local host by,
http://localhost:8080
6)you will see your localhost page.
Hope it solved your problem.
如果您正在运行 Skype,请将其关闭。
If you have Skype running, close it.
此问题是由于您的防火墙没有授予 apache 访问权限。
执行以下步骤:
继续。
他们。
享受。
This issue is due to not given the access on your firewall to apache.
Do the following step:
continue.
them.
enjoy.
从 C: 转到您的 Windows 文件夹,
导航到 C:\Windows\System32\drivers\etc
查找主机(注意:因为这是Windows 7,所以您不能修改主机文件=====>以管理员身份打开记事本,从文件---打开---导航到此处--> ;C:\Windows\System32\drivers\etc,打开主机)
向下滚动页面,并确保本地主机具有此 IP --->前面是127.0.0.1
Go to your windows folder from C:,
navigate to C:\Windows\System32\drivers\etc
look for Host (Note: because this is windows 7, u won't be aalows to modify the host file=====> Open a notepad as administrator, from file ---Open--- navigate here-->C:\Windows\System32\drivers\etc, open host)
scroll down the page, and make sure the local host is having this IP ---> 127.0.0.1 in front of it
尝试确保程序没有使用端口 80 - 如果您正在运行 Skype 或相关程序,请检查它们。也许以安全模式启动到 Windows 并尝试运行 WAMP - 如果它有效,您就知道某些东西正在使用端口 80。
Try to make sure a program isn't using port 80 - If you have skype or related programs running, check them. Maybe boot into windows in safe mode and try running WAMP - if it works you know something is using port 80.