Unable to install PHP-FPM on Apache (Failed to connect to FastCGI server)

Posted by Nyxynyx on Server Fault See other posts from Server Fault or by Nyxynyx
Published on 2012-10-11T21:37:01Z Indexed on 2012/10/12 3:39 UTC
Read the original article Hit count: 846

Filed under:
|
|
|
|

I have been having problem installing php-fpm for use with apache2-mpm-worker. This is the guide that I am following.

According to the guide's Step 5,

Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization

However I cannot find php5-fcgi at /usr/lib, but only /usr/bin/php5-cgi and /usr/bin/php-cgi, which I am not sure if they are the same.

So I changed the lines in Step 5 to:

Alias /php5-fcgi /usr/bin/php5-fcgi
FastCgiExternalServer /usr/bin/php5-fcgi -host 127.0.0.1:9000 -pass-header

On restarting Apache, it's logs gave the errors:

[notice] caught SIGTERM, shutting down
[alert] (4)Interrupted system call: FastCGI: read() from pipe failed (0)
[alert] (4)Interrupted system call: FastCGI: the PM is shutting down, Apache seems to have disappeared - bye
[notice] Apache/2.2.22 (Ubuntu) mod_fastcgi/mod_fastcgi-SNAP-0910052141 configured -- resuming normal operations
[notice] FastCGI: process manager initialized (pid 16348)

And on loading the index page

[error] [client 10.0.2.2] (111)Connection refused: FastCGI: failed to connect to server "/usr/bin/php5-cgi": connect() failed
[error] [client 10.0.2.2] FastCGI: incomplete headers (0 bytes) received from server "/usr/bin/php5-cgi"
[error] [client 10.0.2.2] File does not exist: /var/www/mydomain/public/favicon.ico

Question: Any idea why php5-fcgi is missing, and how should this problem be fixed? Thank you!! :)

© Server Fault or respective owner

Related posts about apache2

Related posts about ubuntu