Error appearing in PHP5-FPM when configuring LNMP is installed in ubuntu12.04
2013/04/26 04:01:05 [Crit] 6119#0: *4 connect () to Unix:/var/run/php5-fpm.sock failed (2:no such file or directory) while Connecting to upstream, client:159.53.110.141, server:216.238.88.42, Request: "get/http/1.1", Upstream: "Fastcgi://un Ix:/var/run/php5-fpm.sock: ", Host:" 216.238.88.42:9090
This is configured in the Nginx
Location ~ \.php$ {
Fastcgi_split_path_info ^ (. +\.php) (/.+) $;
# # Note:you should have "cgi.fix_pathinfo = 0;" In php.ini
#
# # with php5-cgi alone:
# Fastcgi_pass 127.0.0.1:9000;
# # with PHP5-FPM:
Fastcgi_pass Unix:/var/run/php5-fpm.sock;
Fastcgi_index index.php;
Include Fastcgi_params;
}
My personal configuration is to use the sock method after all sock way for high concurrency is still better than using the CGI method
The problem actually appears in the Fastcgi_pass configuration. After Ubuntu 12.10 is installed with PHP5-FPM. We can go
/etc/php5/fpm/pool.d/www.conf
To find such a piece of code inside:
Listen = 127.0.0.1:9000
Add a line below the above code:
Listen =/var/run/php5-fpm.sock
Start php5-fpm after saving
/ETC/INIT.D/PHP5-FPM restart
Then you'll be able to access it normally.