curl ip报错curl: (56) Recv failure: Connection reset by peer

背景:
 curl http://192.168.10.5:8000 网站,出现 curl: (56) Recv failure: Connection reset by peer
telnet 192.168.10.5 8000 通

解决方式:
 1、通过php curl形式去访问,验证可以正常返回结果

2、配置nginx代理

location /xn/ {
   proxy_set_header Host testapi.XXX.com;
   proxy_pass  http://testapi.XXX.com/;
}

你可能感兴趣的:(curl ip报错curl: (56) Recv failure: Connection reset by peer)