sudo apt-get install php5-cli php5-cgi
Uncomment in /etc/hiawatha/php-fcgi.conf the line:
Server = /usr/bin/php5-cgi ; 3; 127.0.0.1:2005 ; www-data ; /etc/php5/cgi/php.ini
Make changes in /etc/php5/cgi/php.ini:
cgi.rfc2616_headers = 1
zlib.output_compression = On
zlib.output_compression_level = 6
Do some optional security settings in /etc/php5/cgi/php.ini
Uncomment in /etc/hiawatha/hiawatha.conf the line:
ServerId = www-data
Change / uncomment in /etc/hiawatha/hiawatha.conf the lines:
FastCGIserver {
FastCGIid = PHP5
ConnectTo = 127.0.0.1:2005
Extension = php, php5
SessionTimeout = 30
}
Uncomment the line:
CGIhandler = /usr/bin/php5-cgi:php
Uncomment: VirtualHost { ... }
Change / correct: Hostname, Websiteroot ... etc.
Enable daemon:
sudo php-fcgi -c /etc/hiawatha/php-fcgi.conf
sudo service hiawatha restart
Read and follow the instructions:
http://www.hiawatha-webserver.org/howto/cgi_and_fastcgi
Have fun