Unfortunately that doesn't work for me - I get a "503 - Service unavaiable" error while trying to open some php document. My hiawatha.conf looks like this:
ServerId = www-data
ConnectionsTotal = 150
ConnectionsPerIP = 10
SystemLogfile = /var/log/hiawatha/system.log
GarbageLogfile = /var/log/hiawatha/garbage.log
Binding {
Port = 80
MaxKeepAlive = 30
TimeForRequest = 3,20
}
BanOnGarbage = 300
BanOnMaxPerIP = 60
BanOnMaxReqSize = 300
KickOnBan = yes
RebanDuringBan = yes
CGIhandler = /usr/bin/perl:pl
CGIhandler = /usr/bin/php5-cgi:php,php5
CGIhandler = /usr/bin/python:py
CGIhandler = /usr/bin/ruby:rb
CGIhandler = /usr/bin/ssi-cgi:shtml
CGIextension = cgi
FastCGIserver {
FastCGIid = PHP5
ConnectTo = 127.0.0.1:2005
Extension = php, php5
SessionTimeout = 30
}
Hostname = 127.0.0.1
WebsiteRoot = /var/www/public
StartFile = index.php
AccessLogfile = /var/log/hiawatha/access.log
ErrorLogfile = /var/log/hiawatha/error.log
TimeForCGI = 5
UseFastCGI = PHP5
And the content of the php-fcgi.conf:
PidFile = /var/run/php-fcgi.pid
Forks = 3
MaxRequests = 100
Server = /usr/bin/php5-fpm ; 127.0.0.1:2005 ; www-data ; /etc/php5/fpm/php.ini
Btw: PHP-FPM comes with a daemon which is running in /etc/init.d plus a PID file in /var/run. Maybe it isn't even necessary to create the php-fcgi.pid file and one can rather utilize the present file?
Kudos,
Olli