原文: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