ubuntu12.04 Installation PHP5-FPM error connect () to Unix:/var/run/php5-fpm.sock

Source: Internet
Author: User
Tags fpm

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.




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.