Forum

Howto: Raspberry Pi

Heiko
2 November 2012, 21:01
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install cmake libc6-dev libssl-dev dpkg-dev debhelper fakeroot libxml2-dev libxslt1-dev

wget http://www.hiawatha-webserver.org/files/hiawatha-8.6.tar.gz
tar -xzvf hiawatha-8.6.tar.gz
cd hiawatha-8.6/extra
./make_debian_package
cd ..
dpkg -i hiawatha_8.6_armhf.deb

Test:
hiawatha -k

The result should be:
Using /usr/local/etc/hiawatha
Reading hiawatha.conf
Readinf mimetype.conf
Configuration OK.

Test:
service hiawatha status

The result should be:
Hiawatha is runnung

Have fun with a great Webserver on Raspberry Pi


PHP with FastCGI (Raspberry Pi)
2 November 2012, 22:22
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
This topic has been closed.