PHP教程

nginx +php-fpm 做代理 报错解决

本文主要是介绍nginx +php-fpm 做代理 报错解决,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

[error] 23388#23388: *1 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 127.0.0.1, server: test.com, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://192.168.9.40:9000", host: "127.0.0.1:8080"

问题原因:之前24行 手动把允许写成any 了,查看php-fpm 的进程也是允许所有,但是好像真的不生效;注释掉,重启php-fpm,访问正常;

 

2021/12/23 01:34:27 [error] 23388#23388: *1 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 127.0.0.1, server: test.com, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://192.168.9.40:9000", host: "127.0.0.1:8080"

该问题是在定义 源节点时,未指定根路径造成的:指定后访问正常 

 

这篇关于nginx +php-fpm 做代理 报错解决的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!