How to install Hiawatha web-server in Ubuntu

To install Hiawatha web-server in Ubuntu

Hiawatha is a lightweight and secure web-server that prevents common web attacks like cross-site scripting(xss), sql injection, and CSRF. Installation of Hiawatha web-server in Ubuntu is explained in detail.


Features

  • Provides CGI and load balancing FastCGI support.
  • It also provides large file support.
  • Chroot support is added.
  • Basic and digest HTTP authentication is provided.
  • Upload speed is controlled via traffic shaping.
  • Internal file caching
  • IPv6 support
  • Reverse proxy functionality
  • HTTP compression using gzip option.
  • Virtual hosting is enabled.
  • Supports WebDAV applications

To install Hiawatha

Add the Hiawatha package into repository by running the following command.

root@linuxhelp:~# add-apt-repository ppa:octavhendra/hiawatha 
 Advanced and secure webserver for Unix
Hiawatha is a webserver with the three key attributes:
secure, easy-to-use, and lightweight
.
.
.
gpg: requesting key DAC7EB24 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpy5jux9ms/trustdb.gpg: trustdb created
gpg: key DAC7EB24: public key " Launchpad PPA for octavhendra"  imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK


Then run the below command to update the newly added repository.

root@linuxhelp:~# apt-get update  
Hit http://in.archive.ubuntu.com wily InRelease
Get:1 http://security.ubuntu.com wily-security InRelease [65.9 kB]                          
Get:2 http://ppa.launchpad.net wily InRelease [16.0 kB]                          
Get:3 http://in.archive.ubuntu.com wily-updates InRelease [65.9 kB]                         
Get:4 http://ppa.launchpad.net wily/main amd64 Packages [557 B]                                         
Hit http://in.archive.ubuntu.com wily-backports InRelease                                    
Get:5 http://security.ubuntu.com wily-security/main Sources [55.8 kB]                          
Hit http://in.archive.ubuntu.com wily/main Sources                     
.
.
.
Hit http://in.archive.ubuntu.com wily-backports/main Translation-en                                                       
Hit http://in.archive.ubuntu.com wily-backports/multiverse Translation-en                                                 
Hit http://in.archive.ubuntu.com wily-backports/restricted Translation-en                                                 
Hit http://in.archive.ubuntu.com wily-backports/universe Translation-en                                                   
Fetched 1,778 kB in 14s (127 kB/s)                                                                                        
Reading package lists... Done


After updating is done, install Hiawatha package.

root@linuxhelp:~# apt-get install hiawatha 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  php5-fpm
The following NEW packages will be installed:
.
.
.
Processing triggers for man-db (2.7.4-1) ...
Setting up hiawatha (10.1-ppa1~wily1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (225-1ubuntu9) ...
Processing triggers for libc-bin (2.21-0ubuntu4) ...


Check the version of Hiawatha by running the following command.

root@linuxhelp:~# Hiawatha -v 
Hiawatha v10.1, cache, IPv6, Monitor, reverse proxy, TLS v2.2.1, Tomahawk, URL toolkit, XSLT
Copyright (c) by Hugo Leisink < hugo@leisink.net> 


Open the browser and enter server IP

Tag : Hiawatha
FAQ
Q
Does Hiawatha support GZip content encoding?
A
Yes. Hiawatha automatically generates and serves GZip-encoded versions of static text-based files such as HTML, XML, CSS and JavaScript, according to the requesting browser's accepted encodings. Compressed versions of files are served from a cache, avoiding repeated CPU-intensive encoding on each request.
Q
Is it possible to run Hiawatha as a service under Windows?
A
Yes, that is possible since version 6.9. The Windows package of Hiawatha contains a Cygwin tool to run Hiawatha as a Windows service. Read the included Installation.txt for more instructions.
Q
Can I specify multiple startfiles for a virtual host?
A
No. If you want to use a different startfile for a directory, use the StartFile option in a .hiawatha file in that directory.
Q
All the hostnames within a domain should show the same website. Is that possible?
A
Yes, you can do this by using a wildcard. Before using the wildcard, a complete hostname must be specified. It is necessary for 301 (redirect) errors.

VirtualHost {
Hostname = www.website.net, *.website.net
...
}
Q
Can Hiawatha show the content of a directory?
A
Yes, use the following option for the VirtualHost section or in a .hiawatha configuration file inside that directory:

ShowIndex = yes