How to Install Hiawatha Web Server on Centos (with Pictures)
Edit Article

  • 1 Editor

Now you might be a frequent website manager using almost every web server there is out there. Web servers like Apache must be by now under your fingertips. Are you by now bored with Apache? Have you tried Ngnix and Lighttpd by now? If the answer to those questions is Yes and you’re not yet satisfied with them like you should be then there is no need to worry. If you’re looking for a web server that challenges your skills and meets all your requirements to the utmost extent then look no further. We introduce to you Hiawatha. Hiawatha is like no web server out there. Designed for speed, Hiawatha is completely free and a light weight web server that has been developed by Hugo Leisink under the license GPLv2. Hiawatha is not like any other web server that you have used before. Hiawatha is a step above others by being a really advanced, an extremely high performing, and a modern web server that is compliant and more than suitable for those servers who are running on old hardware. Though it was built for really small servers but in recent hardware it runs perfectly on low end VPS. Surprisingly some guy actually did manage to run Hiawatha on Rspberry Pi. Hiawatha has been secured to the greatest aspects possible. With security in mind Hiawatha resulted in a web server that resulted scoring highly in both of these places, code and features. If we had sum it all up we can safely say that Hiawatha has the ability to perform tasks that will prevent all the common hack attempts like the SQL injections, XSS, CSRF attack and all those old exploits. The developers of Hiawatha web server left no path un walked when they made this web server the most secure one ever.


There are a few things that you need to do before you rush off to installing Hiawatha on CentOS 7:

  • The first thing that you should have before beginning installing Hiawatha is a dedicated server or a VPS. It should be running CentOS. In this tutorial that I have written for you I am using and this also is what I will recommend you to use as well, Centos7 x86_64. The place that I will be hosting my website is at DigitalOcean.
  • You must have a firm knowledge and grasp over a few things. Things that you will be using in a while include the use of SST and client like Putty. If you are using Mac or Linux then you should know how to use terminal.
  • You should have a basic knowledge of the common important Linux commands.
  • For this tutorial to work you’ll need about 30 minutes of free time.
  • Just to keep you indulged, keep with you a warm cup of tea or coffee if you want.



The first step that you will perform is you will login to your server as root. If for some reason you cannot login as root then you must login as a user who has root / user privileges.



You can install Hiawatha using two ways. Both ways at the end will leave Hiawatha installed on your CentOS 7 VPS or server. The first way is by using a packet and the other one is compiling from the source code all on your own. To make this tutorial fast, I will be using the first method. You should start by installing the third part repo. This needs to be done because Hiawatha is not yet available on CentOS 7 distro by default:



Once you have downloaded this you can easily install this by using the following command:

rpm -ivh anku-release-8-1.noarch.rpm



Now you can install Hiawatha without any trouble by using Yum and enabling the newly installed repo:

yum --enablerepo=anku install hiawatha –y


Once you have installed the Hiawatha web server you should see a scree like this:



If you can’t wait to try it now then you ca run Hiawatha for the first time. All you have to do is enter this following the command:

service hiawatha start


The Hiawatha service should now be running just fine now. If you want to test it then all you have to do is just open your web browser. Once the web browser is opened type in the web address of your VPS. If you’re seeing the default web page of the Hiawatha web server then ‘Hurrah’. If by some chance you’re not seeing the default web page of the Hiawatha web server and seeing something else like a recovery page or an error then go back and repeat the steps mentioned above. There must have been something that you missed.



Now we are going to be creating a web directory. A web directory is a must for any domain and we shall cone for your first domain. Just enter this code:

mkdir -p /var/www/domain.tld

You’ll be directed to a directory. Just go to that directory and create a simple index.html page. This page shall be for testing purpose:

cd /var/www/domain.tld nano index.html

This example that I’ll be giving you is of mine. You will seeing a screen like this!


You can even put simple text in the index.htm file. Just for testing we’ll put this in;


Just save it and then exit.


For that index.html to be accessed over the internet you would have to adjust the Hiawatha default configuration file. The configuration includes adding a few lines so that they can act as Virtual Hosts (vhost block). Before making all that configuration in the file you should firstmake a backup of that file. To do so just type in the following code:

cd /etc/hiawatha cp hiawatha.conf hiawatha.conf.bak nano hiawatha.conf

You can clearly see in the configuration file by scrolling down a little bit that Hiawatha’s configuration file consists of quite a few lines that are easily understandable. Because we are on a very initial stage so we’ll make almost all the changes in the VIRTUAL HOSTS section.


[[]]Remember not to edit all those lines and to copy those lines and put them after the code in the file. You can add # if you want to deactivate unnecessary options. For example:

VirtualHost { Hostname = domain.tld WebsiteRoot = /var/www/domain.tld StartFile = index.html # AccessLogfile = /var/www/my-domain/log/access.log # ErrorLogfile = /var/www/my-domain/log/error.log # TimeForCGI = 5 # UseFastCGI = PHP5 # UseToolkit = banshee }

The example that is given above disables Logfile, uses index.html as the homepage andalso disables PHP5. We disable PHP5 because during the length of this tutorial we did not install PHP5.


Just save and exit the editor.


All you need to do now is restart Hiawatha by entering this command:

service Hiawatha restart


That was it. Now you can just open you web browser again and test the newly added website of yours!

Article Tools

Did this article help you?


an Author!

Write an Article