CentOS 7+nginx+PHP+php-fpm

Posted 实现梦想与回忆的,叫做现在

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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的主要内容,如果未能解决你的问题,请参考以下文章