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. android中完全退出当前应用程序的四种方法

    Android程序有很多Activity,比如说主窗口A,调用了子窗口B,如果在B中直接finish(), 接下里显示的是A.在B中如何关闭整个Android应用程序呢?本人总结了几种比较简单的实现方 ...

  2. JMeter学习笔记--JMeter执行顺序规则

    JMeter执行顺序规则: 配置元件 前置处理器 定时器 采样器 后置处理器(除非服务器响应为空) 断言 监听器 只有当作用域内存在采样器时,定时器.断言.前置/后置处理器才会被执行,逻辑控制器和采样 ...

  3. PLSQL_数据结构类型的解析(概念)

    2014-06-02 Created By BaoXinjian

  4. openssl之EVP系列之9---EVP_Digest系列函数的一个样例

    openssl之EVP系列之9---EVP_Digest系列函数的一个样例     ---依据openssl doc/crypto/EVP_DigestInit.pod翻译     (作者:Drago ...

  5. python 例程的一个好例子

    用例程来写一个求平均值的算法 #!/usr/local/python/bin/python3 def FunCore(): total=0 counter=0 average=None tmp=yie ...

  6. 初识CSS样式表

    背景介绍: 接触了新闻公布系统,这也是自己第一个B/S的项目.从之前的拖拽空间.任意布局到现在的HTML总会有非常多的新奇.棘手和挑战.可是不管是何种形式都离不开主要的步骤:做前台.做后端.能够说一个 ...

  7. iptables的自定义链--子链

    我个人理解:子链的作用就是为了减少重复设置,有的时候可能对数据包进行一系列的处理,而且还被多种规则引用.这样就可以设置成子链,一起跳转过去处理. -j subchain 子链用-N来创建. iptab ...

  8. WCF教程网址

    http://www.cnblogs.com/iamlilinfeng/archive/2012/09/25/2700049.html http://www.cnblogs.com/artech/ar ...

  9. SQL游标操作每隔5分钟时间段数据统计信息

    Tb_People 表信息: id     uname    era     amount    plushtime           1000031    张亮    中年    100000   ...

  10. centos 7 中的 systemd

    systemd的服务管理程序 systemctl是最主要的工具.它融合 service 和chkconfig的功能于一体.你可以使用它永久性或只在当前会话中启用/禁用服务. 下面命令用于列出正在运行的 ...