在连接到本地主机的问题 [英] Having problems connecting to Local Host

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

问题描述

我已经下载并为Windows 7安装了Apache,我试图建立我的本地主机,这样我可以测试一个Eclipse Web项目。我目前甚至无法通过我的浏览器连接到本地主机。当我输入的http://本地主机/ 在Chrome / Firefox中,我收到了连接错误。在Chrome浏览器:

I have downloaded and installed Apache for Windows 7 and am trying to set up my Local Host so that I can test an Eclipse web project. I currently cannot even connect to Local Host through my browser. When I enter http://localhost/ into Chrome/Firefox I get a connection error. In Chrome:

This webpage is not available
Google Chrome's connection attempt to localhost was rejected. The website may be down, or your network may not be properly configured.
Error code: ERR_CONNECTION_REFUSED

这似乎是一些相当基本的配置问题,但我没有经验,知道下一个尝试的东西。你介意给我一些事情要试试?

This seems like some fairly basic configuration problem, but I don't have the experience to know what to try next. Would you mind giving me some things to try out?

如果它可以帮助我试图侦测 127.0.0.1 和我收到的回应,与上网本仍然工作正常。

If it helps I tried pinging 127.0.0.1 and I received a response, and the internet is still working as normal.

感谢

推荐答案

当您在您的浏览器如URL或IP地址类型。 127.0.0.1,你的浏览器假定你正在寻找的80端口,通常写为127.0.0.1:80。

When you type in a URL or IP Address in your browser eg. 127.0.0.1, you're browser assumes you're looking for port 80, usually written as 127.0.0.1:80.

这是可能Apache不运行,或者别的东西在端口80上已经听在Wi​​ndows上,你可以看到在听哪个端口上运行

It's possible Apache isn't running, or something else is already listening on port 80. On Windows, you can see what's listening on which ports by running

netstat -a | find "LISTENING" 

如果别的东西在端口80听,Apache将无法启动,你必须结束启动Apache之前,其他进程。启动Apache后,运行netstat来确保Apache是​​在端口80侦听。

If something else is listening on port 80, Apache won't start up, and you must end the other process before starting Apache. After starting Apache, run netstat to be sure that Apache is listening on port 80.

如果Apache正在运行并监听80,那么很可能你有你的Apache设置一些错误配置。

If Apache is running and listening on 80, then it's likely you have some wrong configurations in your Apache setup.

这篇关于在连接到本地主机的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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