I have just installed:
- FreeBSD 10.2
- Nginx 1.8.1
- PHP 5.5.33
Nginx works fine with PHP that the web sites seems ok to run php pages.
However, once I run php on command line (e.g. php -v), the web site will
“502 Bad Gateway” error, and I find the nginx error log as below:
[error] 714#0: *3 upstream prematurely closed connection while reading
response header from
upstream, client: , server: www.____.com, request: “GET /
var/run/php5-fpm.sock:”, host: ""
I have tried to use either sock or port, but the problem still exist…
idea about what’s wrong? thanks.
“php -v” shows below:
PHP 5.5.33 (cli) (built: Mar 15 2016 01:22:17)
Copyright © 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright © 1998-2015 Zend Technologies
with XCache v3.2.0, Copyright © 2005-2014, by mOo
with Zend OPcache v7.0.6-dev, Copyright © 1999-2015, by Zend
with XCache Cacher v3.2.0, Copyright © 2005-2014, by mOo
Posted at Nginx Forum: