nginx能访问html访问php502,[已解决]nginx页面无法访问:502 Bad Gateway nginx/1.0.15

该博客内容涉及服务器的网络连接状态,显示了多个端口(如22, 80, 3306等)处于监听状态。同时,Nginx的日志文件中记录了一系列'Connection refused'错误,表明从上游服务器127.0.0.1:8080尝试连接时失败,可能涉及到负载均衡或服务未启动的问题。
摘要由CSDN通过智能技术生成

➜  conf.d netstat -tupln

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name

tcp        0      0 0.0.0.0:10022               0.0.0.0:*                   LISTEN      17286/docker-proxy

tcp        0      0 0.0.0.0:9000                0.0.0.0:*                   LISTEN      19706/docker-proxy

tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      17220/mysqld

tcp        0      0 127.0.0.1:6379              0.0.0.0:*                   LISTEN      19659/redis-server

tcp        0      0 0.0.0.0:9003                0.0.0.0:*                   LISTEN      19669/docker-proxy

tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      19128/nginx

tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1335/sshd

tcp        0      0 0.0.0.0:3000                0.0.0.0:*                   LISTEN      17240/docker-proxy

tcp        0      0 0.0.0.0:8088                0.0.0.0:*                   LISTEN      29962/docker-proxy

tcp        0      0 0.0.0.0:5432                0.0.0.0:*                   LISTEN      18421/docker-proxy

tcp        0      0 0.0.0.0:8000                0.0.0.0:*                   LISTEN      19505/docker-proxy

tcp        0      0 0.0.0.0:32771               0.0.0.0:*                   LISTEN      8748/docker-proxy

tcp        0      0 0.0.0.0:32772               0.0.0.0:*                   LISTEN      8782/docker-proxy

udp        0      0 192.168.42.1:123            0.0.0.0:*                               1346/ntpd

udp        0      0 115.29.173.126:123          0.0.0.0:*                               1346/ntpd

udp        0      0 10.161.170.247:123          0.0.0.0:*                               1346/ntpd

udp        0      0 127.0.0.1:123               0.0.0.0:*                               1346/ntpd

udp        0      0 0.0.0.0:123                 0.0.0.0:*                               1346/ntpd

➜  conf.d tail /var/log/nginx/error.log

2016/09/09 11:30:12 [error] 19041#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 114.216.25.29, server: localhost, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "hd.webonn.com"

2016/09/09 11:30:16 [error] 19041#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 114.216.25.29, server: localhost, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "115.29.173.126"

2016/09/09 11:30:26 [error] 19041#0: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 114.216.25.29, server: localhost, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "hd.webonn.com"

2016/09/09 11:30:29 [error] 19041#0: *7 connect() failed (111: Connection refused) while connecting to upstream, client: 114.216.25.29, server: localhost, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "115.29.173.126"

2016/09/09 11:30:29 [error] 19041#0: *7 connect() failed (111: Connection refused) while connecting to upstream, client: 114.216.25.29, server: localhost, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:8080/favicon.ico", host: "115.29.173.126", referrer: "http://115.29.173.126/"

2016/09/09 11:30:30 [error] 19041#0: *11 connect() failed (111: Connection refused) while connecting to upstream, client: 119.147.146.189, server: localhost, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "115.29.173.126"

2016/09/09 11:31:07 [error] 19041#0: *7 connect() failed (111: Connection refused) while connecting to upstream, client: 114.216.25.29, server: localhost, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "115.29.173.126"

2016/09/09 11:31:08 [error] 19041#0: *7 connect() failed (111: Connection refused) while connecting to upstream, client: 114.216.25.29, server: localhost, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:8080/favicon.ico", host: "115.29.173.126", referrer: "http://115.29.173.126/"

2016/09/09 11:33:18 [error] 19129#0: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 114.216.25.29, server: localhost, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "115.29.173.126"

2016/09/09 11:33:18 [error] 19129#0: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 114.216.25.29, server: localhost, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:8080/favicon.ico", host: "115.29.173.126", referrer: "http://115.29.173.126/"

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值