nginx报错

故障1:nginx 502错误

故障描述

一个 post 的请求,直接调接口服务数据正常返回,但是通过 nginx 代理后, 什么都没有返回

nginx错误日志

upstream sent invalid chunked response while reading upstream

原因

http协议版本不一致导致

解决:

nginx配置文件 location加入两条

proxy_http_version 1.1;
proxy_set_header Connection "";

nginx报错_第1张图片

你可能感兴趣的:(nginx,nginx)