nginx 访问php 502,php-fpm 正常启动,nginx也正常启动,但是为什么访问PHP是502

php-fpm是正常启动的,如下

liweideiMac:~ liwei$ ps -ef | grep php-fpm

501  2756     1   0 12:38下午 ??         0:00.00 /usr/local/Cellar/php55/5.5.14/sbin/php-fpm

501  2757  2756   0 12:38下午 ??         0:00.00 /usr/local/Cellar/php55/5.5.14/sbin/php-fpm

501  2758  2756   0 12:38下午 ??         0:00.00 /usr/local/Cellar/php55/5.5.14/sbin/php-fpm

501  2759  2756   0 12:38下午 ??         0:00.00 /usr/local/Cellar/php55/5.5.14/sbin/php-fpm

501  2761  1217   0 12:38下午 ttys000    0:00.00 grep php-fpm

nginx也是正常启动的

$ ps -ef | grep nginx

0   231   158   0 10:19上午 ??         0:00.02 nginx: master process /usr/local/opt/nginx/bin/nginx -g daemon off;

70  1858   231   0 11:39上午 ??         0:00.01 nginx: worker process

70  1859   231   0 11:39上午 ??         0:00.54 nginx: worker process

70  1860   231   0 11:39上午 ??         0:00.53 nginx: worker process

70  1861   231   0 11:39上午 ??         0:00.54 nginx: worker process

70  1862   231   0 11:39上午 ??         0:00.05 nginx: cache manager process

501  2772  1217   0 12:40下午 ttys000    0:00.00 grep nginx

访问PHP的时候提示

An error occurred.

Sorry, the page you are looking for is currently unavailable. Please

try again later.

If you are the system administrator of this resource then you should

check the error log for details.

Faithfully yours, nginx.

打开日志看到如下:

127.0.0.1 - - [30/Jun/2014:12:38:19 +0800] "GET /info.php HTTP/1.1" 502 537 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36"

请问如何解决?

搞清楚问题了,其实都没问题,只是nginx我开启了缓存,我第一次启动失败后,他缓存了502

下次我再访问他就一直都是502了

我将地址后面加了一个?a=1,发现一切正常

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值