报的错误
2018/10/12 16:33:44 [crit] 5351#0: *121 stat() "/root/wwwroot/test/1.html" failed (13: Permission denied), client: 127.0.0.1, server: input.cc, request: "GET /1.html HTTP/1.1", host: "input.cc"
2018/10/12 16:33:44 [error] 5351#0: *121 FastCGI sent in stderr: "Unable to open primary script: /root/wwwroot/test/index.php (No such file or directory)" while reading response header from upstream, client: 127.0.0.1, server: input.cc, request: "GET /1.html HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "input.cc"
2018/10/12 16:33:44 [info] 5351#0: *121 client 127.0.0.1 closed keepalive connection
2018/10/12 16:33:47 [error] 5351#0: *123 FastCGI sent in stderr: "Unable to open primary script: /root/wwwroot/test/2.php (No such file or directory)" while reading response header from upstream, client: 127.0.0.1, server: input.cc, request: "GET /2.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "input.cc"
2018/10/12 16:33:47 [info] 5351#0: *123 client 127.0.0.1 closed keepalive connection
nginx 站点的配置

nginx, php-fpm使用用户和组为www

站点目录与文件的权限

无法访问配置的站点

nginx监听到的错误

本以为是权限问题,我也设置了权限,还是报错.不知道什么问题.
这篇博客主要讨论了一个Nginx站点在运行时遇到的权限问题,错误日志显示无法访问指定的PHP文件,如1.html和2.php,提示'Permission denied'和'No such file or directory'。博主尝试了修改权限,但问题依然存在。内容可能涉及如何排查和解决Nginx与PHP-FPM的配置错误,以及用户和组设置对文件访问的影响。
1442

被折叠的 条评论
为什么被折叠?



