首页 > 代码库 > CentOS 7+nginx+PHP+php-fpm

CentOS 7+nginx+PHP+php-fpm

根据网上资料配置:

        location ~ \.php$ {            #include        fastcgi_params;            fastcgi_pass   127.0.0.1:9000;            fastcgi_index  index.php;            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;            include        fastcgi_params;        }

  死活提示: file not found

error.log 日志:

[error] 27515#0: *35 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream,

  

我的root 路径配置在/home/xxx/路径下, 用户组, 用户权限也是对的,但是一直提示 File not found。

 

最后把路径改到 /usr/local/下面, 就ok了!

CentOS 7+nginx+PHP+php-fpm