良玉的博客 点点滴滴,积水成河_良玉的博客_页游、手游linux运维工程师之路

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



作者:良玉 分类:Nginx 浏览:1505 评论:0
留言列表
发表评论
来宾的头像