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

[error] 17653#0: *139346 connect() failed (111: Connection refused) while connecting to upstream, client: 66.249.79.111, server: www.xxx.com, request: "GET /home.php?mod=space&uid=1431&do=share&view=me&from=space HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "119.91.112.122"

发现php-fpm.conf是以套接字方式通信,而nginx是以端口方式通信,打开php-fpm的配置文件 php-fpm.conf

见下图:

nginx报错:connect() failed (111: Connection refused) while connecting to upstream_第1张图片

替换nginx配置文件nginx.conf的127.0.0.1:9000,修改为如下

nginx报错:connect() failed (111: Connection refused) while connecting to upstream_第2张图片

然后重启:/www/server/nginx/sbin/nginx -s reload

你可能感兴趣的:(linux,php,服务器环境配置,服务器,运维)