欢迎您来到腾讯云!积分商城

腾讯云腾讯云论坛

 找回密码
 立即注册
忘了密码?

扫一扫,访问微社区

快捷导航
搜索
查看: 374|回复: 1

[咨询求助] NGINX+php 502

[复制链接]

1

主题

0

好友

150

积分

小白[LV1]

Rank: 1

云币
540
威望
150
发表于 2018-5-7 17:38:19 |显示全部楼层 |未分类


NGINX 报错:2018/05/07 17:36:35 [error] 12960#0: *25 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: , server: , request: "GET /phpinfo.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: ""

php日志:

[07-May-2018 16:35:29] NOTICE: Terminating ...
[07-May-2018 16:35:29] NOTICE: exiting, bye-bye!
[07-May-2018 16:35:29] NOTICE: fpm is running, pid 13483
[07-May-2018 16:35:29] NOTICE: ready to handle connections
[07-May-2018 16:35:29] NOTICE: systemd monitor interval set to 10000ms

NGINX conf:

[root@VM_0_9_centos conf.d]# cat zabbix.conf
server {
    root /var/www;
    index index.php index.html;
    access_log  /var/log/nginx/access_zabbix.log;
    error_log   /var/log/nginx/error_zabbix.log;
    error_log   /var/log/nginx/debug_error_zabbix.log debug;

    location ~ \.php$ {
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
        fastcgi_buffer_size 128k;
        fastcgi_buffers 4 256k;
        fastcgi_busy_buffers_size 256k;
    }
}


1

主题

0

好友

150

积分

小白[LV1]

Rank: 1

云币
540
威望
150
发表于 2018-5-8 19:16:16 |显示全部楼层
我一核1G的机器配置,fastcgi_pass这连接用TCP连接就会报502,用socket就正常,
2核4G的机器,fastcgi_pass这里用的是TCP没问题
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册
您需要登录后才可以发帖 QQ登录

联系我们|腾讯云平台|积分商城|腾讯云官方论坛    

GMT+8, 2018-7-22 20:16 , Processed in 1.177478 second(s), 28 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部