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. 【jquery】hover方法

    方法名称:hover(over, out) 概述:当鼠标移动到一个匹配的元素上面时,会触发指定的第一个函数.当鼠标移出这个元素时,会触发指定的第二个函数. 参数: 1) overFunction 鼠标 ...

  2. Android Fragment之间传递List数据

    要说的是在两个Fragment之间传递List数据,比如有个List<User>,以及传递字符串数据,比如testId,该如何从FragmentA传递到FragmentB呢? 下面这个例子 ...

  3. oc 异常处理

    #import <UIKit/UIKit.h> #import "AppDelegate.h" int main(int argc, char * argv[]) { ...

  4. 转python+selenium 使用switch_to_alert 出现的怪异常

    如果switch_to_alert不工作,最重要的问题就是,有1个以上的浏览器开启,导致alert抓取不到.并且在使用switch_to_alert的时候时间会比较长一些,需要等待一会儿才能完成acc ...

  5. navicat 在写存储过程的时候总是说语法错误

    这个时候我们在sql的头部加上 DELIMITER $$ 尾部加上 $$DELIMITER;

  6. jquery 可拖拽的窗体控件实现代码

    引入JQUERY框架.把这个控件代码放到一个js文件里面直接引入就可以了控件代码 $.fn.myDrag = function() { var self = $(this); self.css(&qu ...

  7. Linux系统中 Sublime Text 中文 GBK 文件乱码问题

    Sublime Text 是一个很不错编辑器,具有漂亮的界面和强大的功能.再加上丰富的插件,而且还跨平台,绝对是一款实打实的神器啊! 众所周知,Sublime Text 对中文支持的极差,可以说几乎就 ...

  8. ny511 移动小球

    移动小球 时间限制:1000 ms  |  内存限制:65535 KB 难度:2   描述 给你n个小球,从左到右编号依次为1,2,3,4,5,6.........n,并规定小球1的左边的球号为n,小 ...

  9. JavaHbase连接代码示例

    package com.rokid.hbase; import java.io.IOException; import org.apache.hadoop.conf.Configuration; im ...

  10. [流水账]搜索与web-container版本匹配的jar包

    刚才发现自己的servlet-api.jar里面的javax.servlet.jsp为空的,但是我又需要做一些JSP tag-lib的编程,所以没办法,只好去下一个新的包 上网找了找,我用的tomca ...