Forum

503 "can't connect to FastCGI server PHP5"

Gour
1 August 2014, 14:30
At the moment I use kind of shared hosting (ala webfaction) where one is able to build his own webserver which runs locally on some local port behind the system-wide Nging running as reverse proxy.

The usual setup on the host for PHP apps is to use system PHP-FPM along with system's Apache.

My PHP sites are used with my own Hiawatha server (running behind Nginx) and my own copy of PHP-FPM (v5.5.).

However I'd like to simplify admin work on the server by using my own instance of Hiawatha, but without the need to compile/maintain my own version of PHP.

After asking support stuff about the possibility I was advised to try with:
FastCGIserver {
FastCGIid = PHP5
ConnectTo = /var/run/php5-fpm.sock
Extension = php
}

which does not work and I got the following in the log file:

Fri 01 Aug 2014 14:14:52 +0200|can't connect to FastCGI server PHP5
Fri 01 Aug 2014 14:14:53 +0200|FastCGI server PHP5 is still (partially) unavailable

Is it possibly some permission problem?

Hiawatha is running under my uid, while the php5-fpm.sock is:

srw-rw---- 1 www-data www-data 0 Jul 2 22:25 /var/run/php5-fpm.sock

PHP is running:

root 635 0.0 0.0 104264 4488 ? Ss Jul02 0:28 php-fpm: master process (/etc/php5/fpm/php-fpm.conf)
www-data 636 0.0 0.0 104264 3600 ? S Jul02 0:00 php-fpm: pool www
www-data 637 0.0 0.0 104264 3600 ? S Jul02 0:00 php-fpm: pool www

Hiawatha version:

hiawatha -v
Hiawatha v9.6, cache, IPv6, reverse proxy, SSL (1.3.7), Tomahawk, URL toolkit, XSLT

Operating System:

(Debian) Linux someservername 3.10.44 #1 SMP Sat Jun 21 11:57:38 CEST 2014 x86_64 GNU/Linux

Any hint?


Sincerely,
Gour
Dominik lehmann
1 August 2014, 14:36
i think it has to be "/var/lib/hiawatha/php5-fpm.sock" in the www.conf for hiawatha to be able to connect to the socket
Gour
1 August 2014, 17:13
It was permissiom problem - system PHP was running as www-data, so they provided a new config file and init script to easily run my own PHP daemon without the need for complete PHP install. Everything is fine now.
Hugo Leisink
1 August 2014, 20:43
Good to hear it all works now.
This topic has been closed.