ubuntu源码编译nginx1.8和php5.5的蛋疼之处

版权声明:文章来源:良玉的博客 http://www.uouo123.com/ 转载请注明 https://blog.csdn.net/xiangliangyu2008/article/details/82711044

ubuntu源码编译nginx1.8和php5.5的蛋疼之处

错误一:2016/02/04 15:04:35 [error] 10159#0: *87 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.102.132, server: localhost, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.102.132:8080"   

        方法一:修改fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

        方法二:如果你是非root账户,使用普通账户操作,可能出现权限问题导致你出现以上错误,那么,请通过chmod -R  755 你的安装目录文件夹 试一试 ?

        conf/nginx.conf(这个是默认的配置文件,你也可以定制化另一个)和php下的php-fpm.conf配置文件的user的名字最好是一样

错误二: NOTICE: PHP message: PHP Warning:  Module 'PDO' already loaded in Unknown on line 0

        方法:将php.ini 中extension=pdo.so  注释掉;

错误三: NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
                NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root

        方法:就用root来执行开启php-fpm吧!(nginx 也用root)或者sudo!通过php-fpm -R

    -R, --allow-to-run-as-root

                   Allow pool to run as root (disabled by default)

错误四:[crit] 21951#0: *118 open() "xxnginx/proxy_temp/1/00/0000000001" failed (13: Permission denied) while reading upstream,
    方法一:Nginx 运行的user 为webuser,仔细检察我的Nginx 目录权限为root,于是:
    # chown webuser.webuser xx/Nginx -R

    方法二:nginx.conf: 
    user nobody 
    改成:user root

猜你喜欢

转载自blog.csdn.net/xiangliangyu2008/article/details/82711044
今日推荐