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

nginx connect() failed,Connection refused,while connecting to upstream fastcgi的更多相关文章

  1. connect() failed (111: Connection refused) while connecting to upstream

    配置好lamp后,在浏览器中运行程序后,出现上面的错误. 转自:http://www.xuejiehome.com/blread-1828.html I'm experiencing 502 gate ...

  2. nginx 报错 connect() failed (111: Connection refused) while connecting to upstream

    公司网站搬迁到新服务器后,发现站点访问不了,network里面提示502,查看相关的server配置,感觉没有什么问题,经过测试发现txt.html.等非php文件能够直接访问,也就是php访问不了, ...

  3. [nginx] connect() failed (111: Connection refused) while connecting to upstream, client: 101.18.123.107, server: localhost,

    nginx一直报错, 2016/12/02 10:23:19 [error] 1472#0: *31 connect() failed (111: Connection refused)while c ...

  4. nginx访问502 gateway,*1 connect() failed (111: Connection refused) while connecting to upstream

    安装好nginx,php环境后,配置虚拟主机,结果访问后就报502 gateway,查看日志文件后,显示错误如下: 2019/04/29 16:24:39 [error] 19433#19433: * ...

  5. Nginx报错 connect() failed (111: Connection refused) while connecting to upstream 的解决方法

    今天访问公司的网站突然报错,抛出一些英文,提示看一下Nginx的error.log日志: cd  /usr/local/nginx/logs/  看到了error.log ,下一步 tail -n 2 ...

  6. nginx 解决 connect() failed (111: Connection refused) while connecting to upstream,

    嗯哼,刚装了个ubuntu的lnmp,我的天啊,踩的坑比我脂肪还多了 比如刚装完的时候访问显示502, 也不知道什么问题,就去看了一下nginx日志  /var/log/nginx/error.log ...

  7. 解决connect() failed (111: Connection refused) while connecting to upstream

    使用nginx时, 有可能遇到connect() failed (111: Connection refused) while connecting to upstream的问题. 如果upstrea ...

  8. 配置nginx.config 报错:connect() failed (111: Connection refused) while connecting to upstream解决

    php-fpm没有运行 执行如下命令查看是否启动了php-fpm,如果没有则启动你的php-fpm即可 查看: netstat -ant | grep 9000 执行 /usr/local/php/s ...

  9. connect() failed (111: Connection refused) while connecting to upstream, cli

    php-fpm没有运行 执行如下命令查看是否启动了php-fpm,如果没有则启动你的php-fpm即可 netstat -ant | grep 9000 没有运行为空,有运行显示 tcp 0 0 12 ...

随机推荐

  1. 深入理解Java:自定义java注解

    要深入学习注解,我们就必须能定义自己的注解,并使用注解,在定义自己的注解之前,我们就必须要了解Java为我们提供的元注解和相关定义注解的语法. 元注解: 元注解的作用就是负责注解其他注解.Java5. ...

  2. python学习笔记——multiprocessing 多进程模块Process

    系统自带的fork模块创建的多进程是基于Linux或Unix平台的,而window平台并不支持: python中的multiprocess为跨平台版本的多进程模块,支持子进程.通信和共享数据.执行不同 ...

  3. JMeter分布式配置

    搭建进行分布式平台测试前提: 1 所有的防火墙应该关闭 2 所有的客户端应该都是在同一个子网中. 3 确保jMeter可以访问这个服务器 4 确保各个客户端的jMeter的版本都是一致的,不同版本的J ...

  4. FA_资产成批报废(流程)

    2014-06-08 Created By BaoXinjian

  5. Java JNI的具体介绍

    JNI就是Java Native Interface的简称,也就是java本地接口.它提供了若干的API实现了和Java和其它语言的通信(主要是C&C++).也许不少人认为Java已经足够强大 ...

  6. cocos2dx 3.1从零学习(五)——动画

    动画是游戏中最重要的表现部分,本篇仅仅是初步学习大部分动画的用法.没有什么原理性的东西,可是样例有非常多,假设有不熟的地方要练一下. 特别是Spawn和Sequence的组合使用,什么时候使用Spaw ...

  7. struts2 循环标签使用

    struts2 counter循环标签的使用: struts2随提供了循环控制标签<s:iterator/>,,使用起来也比较方便,但在具体的应用中,也有不方便之处,他没有像struts1 ...

  8. mac下安装mysqlcient 报错

    一.我在mac下pip3安装mysqlclient 报错: pip3 install mysqlclient Collecting mysqlclient Using cached mysqlclie ...

  9. 甲骨文关闭OpenSSO后,OpenAM成为其继续者

    消息来源:http://os.51cto.com/art/201003/190108.htm                                        OpenAM主页连接: ht ...

  10. Oracle学习笔记之一,重温范式

    第一范式(1NF) 第一范式是第二和第三范式的基础,是最基本的范式.第一范式包括下列的指导原则: 数据组的每个属性只可以包含一个值. 关系中的每个数组必须只包含相同数量的值. 关系中的每个数组一定不能 ...