linux 使用lnmp 报Unable to open primary script

报的错误
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 站点的配置

clipboard.png

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

clipboard.png

站点目录与文件的权限

clipboard.png

无法访问配置的站点

clipboard.png

nginx监听到的错误

clipboard.png

本以为是权限问题,我也设置了权限,还是报错.不知道什么问题.
阅读 8.7k
2 个回答

确定文件路径没有错吗?确实是 /root/wwwroot/test/index.php 吗?

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题