原文:nginx和php-fpm配置 错误connect() failed (111: Connection refused) while connecting to upstream connect() to unix:/run/php/php7.2-fpm.sock failed (2: No such file or directory) while connecting to upstream

若fpm配置文件中配置如下: listen . . . : 则对应的nginx.conf中的配置应为: fastcgi pass . . . : 此时开启 端口监听,不会生成sock文件 若fpm中的配置为使用Unix套接字,如下: 则对应nginx.conf中的配置应为: 此时 端口未开启,在 run php 下生成php . fpm.sock文件: 若两者不匹配则nginx启动失败。 若fpm ...

2019-11-06 21:46 0 431 推荐指数:

查看详情

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

公司网站搬迁到新服务器后,发现站点访问不了,network里面提示502,查看相关的server配置,感觉没有什么问题,经过测试发现txt、html、等非php文件能够直接访问,也就是php访问不了,初步断定有可能是php-fpm没有安装或者没有启动导致。首先判断php-fpm是否已经安装 ...

Wed Feb 20 00:23:00 CST 2019 1 6492
connect() failed (111: Connection refused) while connecting to upstream的解决

遇到这种情况, 首先 1.检查php-fpm是否启动---------如果没启动->启动, 2.用命令 netstat -ant | grep 9000 查看php-fpm进程,如果没启动->启动,但是还有一种情况,自己已经启动了,但是用这个命令还是什么也不显示,那么请往下 ...

Thu Sep 27 23:41:00 CST 2018 0 2517
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM