VPS侦探论坛

 找回密码
 注册
楼主: licess

LNMP一键安装包的Nginx 502 Bad Gateway错误可能原因及解决方法

[复制链接]
发表于 2011-10-20 11:21:48 | 显示全部楼层

第六种情况如何解决????
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-10-20 12:04:09 | 显示全部楼层

回复 46# 的帖子



没运行就运行
/etc/init.d/php-fpm start
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2011-10-21 13:28:15 | 显示全部楼层

ubuntu11.10


/usr/local/php$ /etc/init.d/php-fpm start
Starting php_fpm /etc/init.d/php-fpm: 156: /usr/local/php/bin/php-cgi: not found
failed

/usr/local/php$ ll
总用量 12
drwxr-xr-x  3 root root 4096 2011-10-21 13:13 ./
drwxr-xr-x 19 root root 4096 2011-10-21 13:14 ../
drwxr-xr-x  2 root root 4096 2011-10-21 13:13 etc/
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-10-21 17:19:21 | 显示全部楼层

回复 48# 的帖子




php没有编译安装成功。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2011-11-17 15:04:06 | 显示全部楼层

系统是Ubuntu server 11.10的
总是出现502错误,纠结了很长时间,发现把PHP编译的代码修改下居然好了,就是去掉php编译的 一个选项 --with-openssl ,不知道是什么原因,麻烦管理员看下日志。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x

军哥运维代购:http://shop63846532.taobao.com/

发表于 2011-11-17 15:06:47 | 显示全部楼层

这个是修改后的日志文件,麻烦管理员看下是哪里出问题了
谢谢了

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
发表于 2011-12-4 14:20:04 | 显示全部楼层

max_requests 多少值合适了? 我这服务器。。一旦访问的人多了。。。就502
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-12-4 16:02:46 | 显示全部楼层

回复 52# 的帖子


可以5个5个的往上加着试试
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2011-12-5 15:39:55 | 显示全部楼层

max_request 我设置为30124 max_children = 500

军哥运维代购:http://shop63846532.taobao.com/

发表于 2011-12-5 16:17:07 | 显示全部楼层



2011/12/03 17:52:20 [crit] 31211#0: *29 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client:

说明php-cgi没有运行。。。请求量一旦在一个时间很多,php-cgi难道就挂了。。。
发表于 2012-1-4 20:19:31 | 显示全部楼层

留个记号。我也遇到了。
不过重启一下就OK了。
我发现这个和硬盘和内存有关系。
我的自动备份设置为凌晨3点。
每次都是在凌晨3点多就出现了这个问题。
或许是我的硬盘满了。自动备份时无法完成压缩出现了这个问题。
又或者是我的内存太小。
我试了一下。
我在凌晨3点当VPS执行自动压缩备份时。
打开网站的速度非常慢。
我的网站数据2G。一键lnmp。linode512
发表于 2012-1-5 23:13:42 | 显示全部楼层

我必须顶一下这个帖子。

以前是  lnmp的升级为 lnmpa的兄弟  和上面所有的问题都没有关系, 使用/root/vhost.sh 将所有的虚拟主机重新添加一遍即可。我折腾了6个小时!!!
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2012-1-11 11:16:16 | 显示全部楼层

我这里也遇到了php 502 错误

错误信息如下:

Starting php_fpm /etc/init.d/php-fpm: line 61: /usr/local/php/bin/php-cgi: No such file or directoryfailed
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2012-1-11 11:35:32 | 显示全部楼层

回复 58# 的帖子

可能php是没有编译安装成功

军哥运维代购:http://shop63846532.taobao.com/

发表于 2012-4-27 14:34:29 | 显示全部楼层

我的出现502 Bad Gateway,跪求解决啊 ubuntu系统

2012/04/24 15:23:28 [crit] 23841#0: *1 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: www.lnmp.org, request: "GET /phpinfo.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "localhost", referrer: "http://localhost/"
2012/04/24 15:23:34 [crit] 23841#0: *1 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: www.lnmp.org, request: "GET /phpmyadmin/ HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "localhost", referrer: "http://localhost/"
2012/04/27 12:06:02 [crit] 1122#0: *1 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: www.lnmp.org, request: "GET /phpinfo.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "localhost", referrer: "http://localhost/"
2012/04/27 12:11:15 [crit] 1122#0: *4 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.1.76, server: www.lnmp.org, request: "GET /phpinfo.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "192.168.1.82", referrer: "http://192.168.1.82/"
2012/04/27 12:14:11 [crit] 1122#0: *7 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.1.76, server: www.lnmp.org, request: "GET /phpinfo.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "192.168.1.82", referrer: "http://192.168.1.82/"
2012/04/27 14:05:57 [emerg] 24217#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2012/04/27 14:05:57 [emerg] 24217#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2012/04/27 14:05:57 [emerg] 24217#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2012/04/27 14:05:57 [emerg] 24217#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2012/04/27 14:05:57 [emerg] 24217#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2012/04/27 14:05:57 [emerg] 24217#0: still could not bind()
2012/04/27 14:07:04 [crit] 1122#0: *9 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.1.76, server: www.lnmp.org, request: "GET /phpinfo.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "192.168.1.82", referrer: "http://192.168.1.82/"
2012/04/27 14:07:09 [crit] 1122#0: *9 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.1.76, server: www.lnmp.org, request: "GET /phpmyadmin/ HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "192.168.1.82", referrer: "http://192.168.1.82/"
2012/04/27 14:14:41 [crit] 1122#0: *12 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.1.76, server: www.lnmp.org, request: "GET /phpmyadmin/ HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "192.168.1.82", referrer: "http://192.168.1.82/"
2012/04/27 14:15:06 [crit] 1122#0: *14 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: www.lnmp.org, request: "GET /phpinfo.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "localhost", referrer: "http://localhost/"
2012/04/27 14:17:24 [crit] 1122#0: *16 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: www.lnmp.org, request: "GET /p.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "localhost"
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-12-11 23:01 , Processed in 0.030654 second(s), 14 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表