简体   繁体   English

MacOSX 连接上的 localhost 被拒绝

[英]localhost on MacOSX connection refused

I've had my app running on localhost port 80 via nginx on my mac for quite awhile.我的应用程序在我的 Mac 上通过 nginx 在 localhost 端口 80 上运行了很长一段时间。 Recently I did some software updates and was trying to run other apps on different ports and now I can't run my first app on localhost:80.最近我做了一些软件更新,并试图在不同的端口上运行其他应用程序,现在我无法在 localhost:80 上运行我的第一个应用程序。

I've very confused on where to start but think this is a firewall issue based on the following:我对从哪里开始感到非常困惑,但认为这是基于以下内容的防火墙问题:

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 

pointing the browser to http://localhost gives this Oops! Google Chrome could not connect to localhost将浏览器指向http://localhost给出了这个Oops! Google Chrome could not connect to localhost Oops! Google Chrome could not connect to localhost

thoughts?想法?

you may want to run 你可能想跑

apachectl configtest

first. 第一。

My problem was specific, but might help another user.我的问题很具体,但可能会帮助其他用户。 On Mac OS go to system preferences/sharing and check your computer name/localhost name (click edit to see the localhost name).在 Mac OS 上,转到系统首选项/共享并检查您的计算机名称/本地主机名称(单击编辑以查看本地主机名称)。 My computer was reset by Apple in a non-English speaking country.我的电脑在非英语国家被 Apple 重置。 They stuck some of their language in my computer name (great idea!) and it broke the Cisco login to localhost他们在我的计算机名中加入了一些他们的语言(好主意!),它破坏了 Cisco 登录到 localhost

对我有用的是在/ etc / hosts文件中取消注释以下行:

::1    localhost

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 MySQL连接在本地主机上被拒绝 - Mysql connection refused on localhost MAC,MAMP,127.0.0.1连接拒绝,localhost罚款 - MAC, MAMP, 127.0.0.1 connection refused, localhost fine OSX:Chrome 无法连接到 .localhost-domains。 拒绝连接 - OSX : Chrome cannot connect to .localhost-domains. Connection refused 运行“远程调试器”时出错:无法打开调试器端口(本地主机:5005):java.net.ConnectException“连接被拒绝(连接被拒绝)” - Error running 'Remote Debugger': Unable to open debugger port (localhost:5005): java.net.ConnectException "Connection refused (Connection refused)" SSH -L 连接成功,但本地主机端口转发不起作用“通道 3:打开失败:连接失败:连接被拒绝” - SSH -L connection successful, but localhost port forwarding not working "channel 3: open failed: connect failed: Connection refused" 无法连接到服务器:localhost / 127.0.0.1:9000:尝试一次失败。 java.net.ConnectException:连接被拒绝 - Failed to connect to server: localhost/127.0.0.1:9000: try once and fail. java.net.ConnectException: Connection refused psql:无法连接到服务器:连接被拒绝服务器是否在主机“ localhost”(:: 1)上运行并在端口5432上接受TCP / IP连接? - psql: could not connect to server: Connection refused Is the server running on host “localhost” (::1) and accepting TCP/IP connections on port 5432? 拒绝连接到本地主机上的虚拟主机 - Refused to connect to virtual host on localhost “本地主机拒绝连接”vscode html - "localhost refused to connect" vscode html UNIX套接字连接被拒绝 - UNIX socket connection refused
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM