Wednesday, June 13, 2012

How to start using php with the Hiawatha webserver (draft)

Step 1: Download Hiawatha by going to and downloading the appropriate package such as the debian package at

Step 2: If you chose the debian package, run dpkg -i hiawatha*.deb from the command line.

Step 3: Go to Samiux's Almost Secure and Perfect Ubuntu Server blog post, "HOWTO : Highest secured Hiawatha Web Server (6.17.1) on Ubuntu 9.04 Server" at and repeat step 1. Perhaps all of the packages are not needed, but okay.

Step 4: Construct a default website using HowTo: Defining Websites in on the hiawatha site ( Use Hostname =

Step 5: Uncomment "CGIhandler = /usr/bin/php5-cgi:php,php5" in hiawatha.conf in folder /etc/hiawatha.

Step 6: Uncomment the FastCGIserver block in hiawatha.conf

Step 7: Add "ExecuteCGI = yes" in the default website block in hiawatha.conf.

Step 8: In php-fcgi.conf uncomment: Server = /usr/bin/php5-cgi; 3 ; ; www-data ; /etc/php5/cgi/php.ini

Step 9: Uncomment www-data in hiawatha.conf ?

Step 10: create index.php in /var/www/dummy by typing sudo touch index.php. Make sure that index.php is executable using chmod?

Step 11: Follow the instructions in php-configuration on the hiawatha webserver site ( php.ini should be in the folder: /etc/php5/cgi/php.ini.

Step 12: Run php-fcgi with the kill (-k) option

Step 13: Run php-fcgi with no options to restart the cgi daemons

Step 14: Stop hiawatha with "/etc/init.d/hiawatha stop" from the command line.

Step 15: Start hiawatha with "/etc/init.d/hiawatha start from the command line.

Step 16: Modify index.php in the /var/www/dummy folder by placing the following:

Step 17: If there is a printout at localhost/index.php in the webbrowser, things should be working.

1 comment:

  1. Your blog has given me that thing which I never expect to get from all over the websites. Nice post guys!

    melbourne web design