zoukankan      html  css  js  c++  java
  • lnmp1.0 升级php.5.4.28 后出错 Nginx 502 Bad Gateway

    碰到一个很奇怪的问题,用lnmp自带的./upgrade_php.sh升级 php5.4.27正常。
    但升级到php5.4.28就出错,访问p.php 提示:Nginx 502 Bad Gateway。上午的时候又试了下,升级到5.5.12访问p.php也是同样的提示:Nginx 502 Bad Gateway
    升级的提示都是表示成功,php-fpm也提示启动成功。

    但访问p.php页面就提示 :502,是不是php 5.4.28 以上的版本安装配置有变化?

    环境:
    centos 6.5  x86_64
    nginx 1.60
    mysql 5.5

    nginx_error.log 里报错:

    2014/05/27 14:04:35 [crit] 2971#0: *1 connect() to unix:/tmp/php-cgi.sock failed (13: Permission denied) while connecting to upstream

    查看unix:/tmp/php-cgi.soc文件权限,果然是root:root

     解决方法为:

    /usr/local/php/etc/php-fpm.conf里listen下面添加上
    listen.backlog = -1
    listen.allowed_clients = 127.0.0.1
    listen.owner = www
    listen.group = www
    listen.mode = 0666
    重启php-fpm

    一切就变好了

  • 相关阅读:
    P5107 能量采集
    P4655 [CEOI2017]Building Bridges
    P1129 [ZJOI2007]矩阵游戏
    P5299 [PKUWC2018]Slay the Spire
    P1625求和 giao精大杂烩
    背包
    根号分治
    CF963B
    国王游戏
    P6006 USACO 3SUM G
  • 原文地址:https://www.cnblogs.com/chuanheng/p/lnmp_update.html
Copyright © 2011-2022 走看看