phpstudy nginx 报错upstream prematurely closed connection while reading response header from up

环境

phpstudy php7.0.12-nts + Nginx

错误

早上一访问本地就报502,然后重启 + 重新配置nginx.conf也无效
然后取查看phpstudy 的 nginx/logs/error.log 发现一访问本地网站就报下面错

phpstudy报错
[error] 37564#37228: *1 upstream prematurely closed connection while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "GET /1.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost"
翻译:从上游读取响应头时上游过早关闭的连接
个人猜想:传输数据过多,其实是header过大的问题,杀掉9000端口

其中“GET /1.php HTTP/1.1” 是我访问本地的phpstudy中www目录下1.php 文件

后面通过杀掉windows 9000端口进程就好了
1、打开windows CMD窗口
两步方法 : 1 查询端口占用,2 强行杀死进程
phpstudy nginx 报错upstream prematurely closed connection while reading response header from up_第1张图片

再次访问就可以了

你可能感兴趣的:(nginx)