• nginx connect() failed,Connection refused,while connecting to upstream fastcgi


    connect() failed (111: Connection refused) while connecting to upstream fastcgi://127.0.0.1:9000

    netstat -ant | grep 9000

    vim /etc/php/7.0/fpm/php-fpm.conf

    or /etc/php/7.0/fpm/pool.d/www.conf

    发现 listen = /run/php/php7.0-fpm.sock

    修改nginx fastcgi_pass

    1. location ~ .php$ {
    2. fastcgi_pass unix:/tmp/php-cgi.sock;

    connect() to unix:/run/php/php7.0-fpm.sock failed (13: Permission denied)

    The php user was www-data but the nginx user was nginx.

     /etc/php/7.0/fpm/pool.d/www.conf

    You can change nginx to use www-data user,

    or, as I did, add nginx user to the www-data group using sudo usermod -a -G www-data nginx

  • 相关阅读:
    php的session和cookie
    CRUD
    hibernate关系映射
    hibernate hql
    String和StringBuffer的区别
    策略模式Strategy
    项目结构
    final关键字
    项目中的建议
    struts学习记录
  • 原文地址:https://www.cnblogs.com/elesos/p/9334805.html
Copyright © 2020-2023  润新知