2013-10-25 86 views
4

我已经让我的应用在本地端口80上通过nginx在我的mac上运行了很长时间。最近我做了一些软件更新,并试图在不同端口上运行其他应用程序,现在我无法在localhost上运行我的第一个应用程序:80。MacOSX连接上的本地主机被拒绝

我已经从哪里开始很迷茫,但认为这是基于以下防火墙的问题:

Tims-MacBook-Pro-2:html TimPeterson$ telnet localhost 80 
Trying ::1... 
telnet: connect to address ::1: Connection refused 
Trying fe80::1... 
telnet: connect to address fe80::1: Connection refused 
Trying 127.0.0.1... 
telnet: connect to address 127.0.0.1: Connection refused 
telnet: Unable to connect to remote host 

将浏览器指向http://localhost给出了这样的Oops! Google Chrome could not connect to localhost

想法?

+0

答案在此设置线程http://stackoverflow.com/questions/19607457/cant-run -web-app-on-localhost-mac –

+0

我无法看到你指向该链接的答案。安装ngnix后,我也得到了这个错误(与MySql错误一样),但我认为通过与你不同的方法。 – MikeiLL

+0

我猜@timpeterson是指你应该使用'127.0.0.1'而不是'localhost'。 –

回答

3

你可能要运行

apachectl configtest 

第一。

+1

虽然此代码可能回答问题,但提供有关* why *和/或* how *代码如何回答该问题的其他上下文可以提高其长期价值。 –

0

什么工作对我来说是取消注释下面一行在我的/ etc/hosts文件:

::1 localhost 
相关问题