Use the Yum installed PHP-FPM, always throw the wrong time:
Connect () failed (111:connection refused) while connecting to upstream, client:127.0.0.1, Server:localhost
Appears to be nginx not even to PHP-FPM, find to find out, found is the problem of PHP-FPM configuration:
Open PHP-FPM configuration file:/etc/php-fpm.d/www.conf,
Find Listen =/run/php-fpm/www.sock,
Because the Nginx is a match:
Location ~ \.php (. *) $ {
fastcgi_pass 127.0.0.1:9000;
Fastcgi_index index.php;
Fastcgi_split_path_info ^ (? U). +\.php) (/?. +)$;
Fastcgi_param script_filename $document _root/$fastcgi _script_name;
Include Fastcgi_params;
}
Nginx with: Fastcgi_pass 127.0.0.1:9000; TCP socket Mode
So the corresponding listen =/run/php-fpm/www.sock in php-fpm
Also change to: listen = 127.0.0.1:9000 or Direct listen = 9000,
About Fastcgi_pass, reference: Http://wiki.nginx.org/HttpFastcgiModule#fastcgi_pass
About the difference between a TCP socket and a UNIX socket, refer to: http://serverfault.com/questions/124517/ Whats-the-difference-between-unix-socket-and-tcp-ip-socket