【nginx】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 站点的配置
nginx, php-fpm使用用户和组为www
站点目录与文件的权限
无法访问配置的站点
nginx监听到的错误
本以为是权限问题,我也设置了权限,还是报错.不知道什么问题.
回答
确定文件路径没有错吗?确实是 /root/wwwroot/test/index.php
吗?
我也遇到了这个问题。。请问楼主解决了吗
以上是 【nginx】linux 使用lnmp 报Unable to open primary script 的全部内容, 来源链接: utcz.com/a/83376.html