php 解决:502 bad gateway



写好上线没什么想法,活动开始,网站慢慢被更多人知道,访问的越来越多,每天最高16W的访问量,突然投诉多了,说:502 bad gateway


搞了一天多时间,最后终于试出来了:网上有关502的解决方法太多了,我都去试了,帖子抄袭太多,看了很多很多,试了很多很多


最后就找到一篇帖子解决了,我这种情况的问题:http://www.digitalwhores.net/ubuntu-2/error-502-connect-to-unixvarrunphp5-fpm-sock-failed-11-resource-temporarily-unavailable-while-connecting-to-upstream/   当然它的端口和我的端口值不一样



ERROR 502 – connect() to unix:/var/run/php5-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream

 

2015/11/24 12:01:49 [error] 48055#0: *14094117 connect() to unix:/var/run/php5-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client:

Once again, i’m struggling with nginx + php-fpm

sudo nano /etc/php5/fpm/pool.d/www.conf

search for

listen = /var/run/php5-fpm.sock

and replace it for

listen = 127.0.0.1:7777

On the *.conf files of sites-enabled (/etc/nginx/sites-enabled/)

replace (or comment)

fastcgi_pass unix:/var/run/php5-fpm.sock;

with

fastcgi_pass 127.0.0.1:7777;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值