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

24 篇文章 0 订阅
19 篇文章 0 订阅

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

向良玉

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值