环境
phpstudy php7.3.4-nts + Nginx
错误
早上一访问本地就报error/502,然后重启 + 重新配置nginx.conf也无效
然后取查看phpstudy 的 nginx/logs/error.log
发现一访问本地网站就报下面错
phpstudy报错
[error] 9928#6652: *1 upstream prematurely closed connection while reading response header from upstream, client: 127.0.0.1, server: www.erp.top, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9001", host: "www.erp.top"
翻译:从上游读取响应头时上游过早关闭的连接
后面通过杀掉windows 9000端口进程就好了
1、打开windows CMD窗口
两步方法 : 1 查询端口占用,2 强行杀死进程