How to Install Hiawatha Webserver on CentOS7 – Part 1
Hiawatha is an open source webserver with a focus on security.Hiawatha is an open source webserver with security, easy to use and lightweight as the three key features. Hiawatha supports among others (Fast)CGI, IPv6, URL rewriting and reverse proxy. It has security features no other webserver has, like blocking SQL injections, XSS and CSRF attacks and exploit attempts. The built-in monitoring tool makes it perfect for large scale deployments.
It is available on many operating systems such as Debian, Ubuntu, Gentoo, Fedora, FreeBSD, OpenBSD, NetBSD, MacOS X. Because of the use of a platform-independent build system, it’s very likely that Hiawatha will compile and run on other Unix-clones as well.
In this tutorial we will look at how to install hiawatha on CentOS 7.The system parameters we will use in this tutorial are as follows:
Hostname – server.example.com
Operating system – CentOS Linux 7
IP Address – 192.168.234.160/24.
- step 1 : Setup
Hiawatha web server is not available in the default repositories on CentOS 7,we therefore will install from the anku repository.To install the anku repository for Centos 7 ,run the following command:
rpm -ivh http://anku.ecualinux.com/7/x86_64/anku-release-8-1.noarch.rpm
After installing the repo,run
yum repolist
to update the repositories on the system.
Once the repo is updated,we should be able to search hiawatha webserver and install afterwards.
[root@server ~]# yum search hiawatha Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.coreix.net * epel: mirror.onet.pl * extras: mirrors.coreix.net * updates: mirrors.coreix.net ============================ N/S matched: hiawatha ============================= hiawatha.x86_64 : Hiawatha, an advanced and secure webserver for Unix hiawatha-extra.x86_64 : Extra tools for Hiawatha Web Server
We can go ahead and install hiawatha web server.
- step 2 : Installtion
To install hiawtha,run the command:
yum install hiawatha
Once installation is done,we can run the following commands:
To start the server:
systemctl start hiawatha
To enable server to persist reboot :
systemctl enable hiawatha
To check the status of hiawatha :
systemctl status hiawatha
We can confirm if system is running on port 80 and is being run by hiawatha by running
netstat -tulpn | grep 80
Output should be similar to the below:
[root@server ~]# netstat -tulpn | grep 80 tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 3134/hiawatha
Congratulation, server is running hiawatha Webserver.
The configuation files are located in the /etc/hiawatha directory and the default Document Root is /var/www/hiawatha
We can customize this to suit our needs and purpose.In the next part of this article we will look at how we can run php on hiawatha
- step 3 : Testing
Open a web browser and type the URL in the format http://IP .In this tutorial our system is configured with IP – 192.168.234.160/24.Output should should be similar to the below.
References:
https://www.hiawatha-webserver.org/
https://www.centos.org/
http://anku.ecualinux.com/