小编Al *_*Che的帖子

无法连接到 127.0.0.1 端口 80

我正在运行nginx服务器(与哪个服务器无关):

$ sudo netstat -tulpn | grep 80

  tcp     0      0 0.0.0.0:80   0.0.0.0:*         LISTEN      4268/nginx      
  tcp6    0      0 :::80        :::*              LISTEN      4268/nginx
Run Code Online (Sandbox Code Playgroud)

然后我将请求发送到 127.0.0.1

$ curl -v 127.0.0.1

* Rebuilt URL to: 127.0.0.1/
* Hostname was NOT found in DNS cache
*   Trying 127.0.0.1...
* connect to 127.0.0.1 port 80 failed: Connection refused
* Failed to connect to 127.0.0.1 port 80: Connection refused
* Closing connection 0
curl: (7) Failed to connect to 127.0.0.1 port 80: Connection refused …
Run Code Online (Sandbox Code Playgroud)

linux ubuntu port localhost

13
推荐指数
1
解决办法
8万
查看次数

标签 统计

linux ×1

localhost ×1

port ×1

ubuntu ×1