#1 2013-11-24 15:41:23

ZEROF
Trusted Member
From: http://backbox.org
Registered: 2013-10-24
Posts: 124
Website

How to install Hiawatha web server, PHP5 and MariaDB.

Hi all,

This is my 2 cents for LowEndSpirit users. Hiawatha is advanced and secure webserver for Unix.

"Hiawatha has been written with security in mind. This resulted in a highly secure webserver in both code and features. Hiawatha can stop SQL injections, XSS and CSRF attacks and exploit attempts. Via a specially crafted monitoring tool, you can keep track of all your webservers."

OS: Debian 7 (64bit)
PHP: 5.4
SQL: MariaDB


We will start with php installation:

apt-get install php5 php-pear php5-curl php5-mysql php5-fpm

Now we will install MariaDB (mariadb is faster then classic mysql and optimized, but commands are same, more information here) :

apt-get install python-software-properties
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
add-apt-repository 'deb http://nwps.ws/pub/mariadb/repo/5.5/debian wheezy main'
apt-get update
apt-get install mariadb-server

Now we will install Hiawatha web server. You can get package for your distro from download page. This is 64bit Debian 7 guide.

apt-get install libxslt1.1
wget http://files.tuxhelp.org/hiawatha/hiawatha_9.7_amd64.deb;dpkg -i hiawatha*

To start/stop hiawatha:

service hiawatha start
service hiawatha stop

Server need some extra settings that you can find inside /etc/hiawatha/hiawatha.conf file. If somebody want to learn more i will be glad to share information about setting php5-fpm, vhost and few security settings, but all this can be found on Hiawatha HOW TO page.

Next configuration steps are:

1. Setting vhost
2. Setting php5-fpm
3. Setting php.ini and php-fpm.conf (inside /etc/php5/fpm/)
4. Add xss, csrf and sqli protection

This is how will look your new home page:

capture9.jpg

Have fun, security and speed with Hiawatha !

Tutorial made for all Linux lovers by ZEROF !

Last edited by ZEROF (2014-08-24 01:27:03)

Offline

#2 2013-11-24 19:04:41

ZEROF
Trusted Member
From: http://backbox.org
Registered: 2013-10-24
Posts: 124
Website

Re: How to install Hiawatha web server, PHP5 and MariaDB.

Hi Ray,

You think that MariaDB and Hiawatha packages are not secure? Great, what i will not here from you. But, sure, you can always install from source and check if some rootkit turn inside your system.

Cheers!

Offline

#3 2013-11-24 19:38:42

mikho
Low End Mod
From: Hell and gore == Sweden
Registered: 2013-03-02
Posts: 1,297
Website

Re: How to install Hiawatha web server, PHP5 and MariaDB.

Interesting topic, never used Hiawatha and still choosing mysql out of habit, even if I've tried Mariadb a few times.

Offline

#4 2014-02-12 03:27:09

cch
Member
Registered: 2014-01-20
Posts: 7

Re: How to install Hiawatha web server, PHP5 and MariaDB.

Trying to follow your tutorial but this command add-apt-repository 'deb http://mirrors.linsrv.net/mariadb/repo/5.5/debian wheezy main' give me an error message command not found. Any ideas?

Thanks

Offline

#5 2014-02-12 12:20:36

wcypierre
Trusted Member
Registered: 2013-08-07
Posts: 59

Re: How to install Hiawatha web server, PHP5 and MariaDB.

cch wrote:

Trying to follow your tutorial but this command add-apt-repository 'deb http://mirrors.linsrv.net/mariadb/repo/5.5/debian wheezy main' give me an error message command not found. Any ideas?

Thanks

install this before doing the above command.

apt-get install software-properties-common

Offline

#6 2014-02-13 18:40:07

cch
Member
Registered: 2014-01-20
Posts: 7

Re: How to install Hiawatha web server, PHP5 and MariaDB.

wcypierre wrote:
cch wrote:

Trying to follow your tutorial but this command add-apt-repository 'deb http://mirrors.linsrv.net/mariadb/repo/5.5/debian wheezy main' give me an error message command not found. Any ideas?

Thanks

install this before doing the above command.

apt-get install software-properties-common


Unable to locate package software-properties-common is what I get any other ideas?

Thanks

Offline

#7 2014-02-14 05:28:46

wcypierre
Trusted Member
Registered: 2013-08-07
Posts: 59

Re: How to install Hiawatha web server, PHP5 and MariaDB.

cch wrote:
wcypierre wrote:

install this before doing the above command.

apt-get install software-properties-common


Unable to locate package software-properties-common is what I get any other ideas?

Thanks

Then probably that the package is missing in the repo that you've enabled then. Let's do it the manual way then.

apt-get install nano -y
sudo nano /etc/apt/sources.list.d/MariaDB.list

Copy this chunk into the file and paste it into the terminal(or putty, or whatever that you're using) via CTRL + Shift + V or Right Click + Paste
# MariaDB 5.5 repository list - created 2014-02-14 05:25 UTC
# http://mariadb.org/mariadb/repositories/
deb http://mirrors.linsrv.net/mariadb/repo/5.5/debian wheezy main
deb-src http://mirrors.linsrv.net/mariadb/repo/5.5/debian wheezy main

Press CTRL + O + Enter to save the file.

After that, apt-get update then apt-get install mariadb-server and continue with the rest of the tutorial

Offline

#8 2014-02-14 19:59:24

cch
Member
Registered: 2014-01-20
Posts: 7

Re: How to install Hiawatha web server, PHP5 and MariaDB.

wcypierre wrote:
cch wrote:

Unable to locate package software-properties-common is what I get any other ideas?

Thanks

Then probably that the package is missing in the repo that you've enabled then. Let's do it the manual way then.

apt-get install nano -y
sudo nano /etc/apt/sources.list.d/MariaDB.list

Copy this chunk into the file and paste it into the terminal(or putty, or whatever that you're using) via CTRL + Shift + V or Right Click + Paste
# MariaDB 5.5 repository list - created 2014-02-14 05:25 UTC
# http://mariadb.org/mariadb/repositories/
deb http://mirrors.linsrv.net/mariadb/repo/5.5/debian wheezy main
deb-src http://mirrors.linsrv.net/mariadb/repo/5.5/debian wheezy main

Press CTRL + O + Enter to save the file.

After that, apt-get update then apt-get install mariadb-server and continue with the rest of the tutorial

Thanks did all that and then the last apt-get install mariadb-server gives me this:

The following packages have unmet dependencies:
mariadb-server : Depends: mariadb-server-5.5 (= 5.5.35+maria-1~wheezy) but it is not going to be installed
E: Broken packages

the add apt-get still doesn't work. Don't know where that letter E: is coming from?

Thanks

Offline

#9 2014-02-14 21:39:10

mikho
Low End Mod
From: Hell and gore == Sweden
Registered: 2013-03-02
Posts: 1,297
Website

Re: How to install Hiawatha web server, PHP5 and MariaDB.

E: == Error message.
Could try to run apt-get update and then apt-get install with -f (thats from the top of my head)

Offline

#10 2014-02-15 02:51:57

wcypierre
Trusted Member
Registered: 2013-08-07
Posts: 59

Re: How to install Hiawatha web server, PHP5 and MariaDB.

cch wrote:
wcypierre wrote:

Then probably that the package is missing in the repo that you've enabled then. Let's do it the manual way then.

apt-get install nano -y
sudo nano /etc/apt/sources.list.d/MariaDB.list

Copy this chunk into the file and paste it into the terminal(or putty, or whatever that you're using) via CTRL + Shift + V or Right Click + Paste
# MariaDB 5.5 repository list - created 2014-02-14 05:25 UTC
# http://mariadb.org/mariadb/repositories/
deb http://mirrors.linsrv.net/mariadb/repo/5.5/debian wheezy main
deb-src http://mirrors.linsrv.net/mariadb/repo/5.5/debian wheezy main

Press CTRL + O + Enter to save the file.

After that, apt-get update then apt-get install mariadb-server and continue with the rest of the tutorial

Thanks did all that and then the last apt-get install mariadb-server gives me this:

The following packages have unmet dependencies:
mariadb-server : Depends: mariadb-server-5.5 (= 5.5.35+maria-1~wheezy) but it is not going to be installed
E: Broken packages

the add apt-get still doesn't work. Don't know where that letter E: is coming from?

Thanks

You can ignore the apt-get update as it is not needed, and do the apt-get install -f only to see what is happening.

btw, I have just tried to install this via my UK LES, and it is working perfectly fine though(the add-apt-repository), although the hiawatha's link is outdated so I had to change the version from 9.3 to 9.3.1, but its no big deal, and it went pretty smoothly.

just for the sake of getting things right, are you using Debian 7 instead of Debian 6?

Offline

#11 2014-02-15 15:31:26

cch
Member
Registered: 2014-01-20
Posts: 7

Re: How to install Hiawatha web server, PHP5 and MariaDB.

Using Debian 7 64 bit just as the tutorial says. I'm on the Dallas vps if that makes a difference? Command not found on the add-apt-repository. Do I need to change to Debian 6?

Offline

#12 2014-02-15 16:14:44

wcypierre
Trusted Member
Registered: 2013-08-07
Posts: 59

Re: How to install Hiawatha web server, PHP5 and MariaDB.

cch wrote:

Using Debian 7 64 bit just as the tutorial says. I'm on the Dallas vps if that makes a difference? Command not found on the add-apt-repository. Do I need to change to Debian 6?

It doesn't, I guess. Weird that it worked perfectly fine for me but it went wrong for you. No, I was just asking of whether you're using the wrong version of Debian or not.

Anyway, how's the result of apt-get install -f?

Offline

#13 2014-03-09 23:01:44

ZEROF
Trusted Member
From: http://backbox.org
Registered: 2013-10-24
Posts: 124
Website

Re: How to install Hiawatha web server, PHP5 and MariaDB.

I just updated tutorial with last Hiawatha server version download link. Thank you for your interest in Hiawatha.

Offline

#14 2014-03-22 16:11:15

ZEROF
Trusted Member
From: http://backbox.org
Registered: 2013-10-24
Posts: 124
Website

Re: How to install Hiawatha web server, PHP5 and MariaDB.

Hiawatha update to version 9.4. Download link updated.

Offline

#15 2014-07-24 20:45:25

tko
Trusted Member
Registered: 2014-03-31
Posts: 5

Re: How to install Hiawatha web server, PHP5 and MariaDB.

thx for the guide,

some of the links (maria, hiawatha) are not uptodate anymore, so if anyone uses this guide ... go the website and to find the right repros.

also, for ipv6 you need to edit the hiawatha config

nano /etc/hiawatha/hiawatha.conf

Binding {
        Port = 80
        Interface = one of your ipv6s
###
}

restart, and you should see the default page.

Offline

#16 2014-07-24 23:43:21

ZEROF
Trusted Member
From: http://backbox.org
Registered: 2013-10-24
Posts: 124
Website

Re: How to install Hiawatha web server, PHP5 and MariaDB.

Thanks tko,

I just update Hiawatha version to last stable one and replace old MariaDB repository with new one.

Cheers!

Offline

#17 2014-08-24 01:27:50

ZEROF
Trusted Member
From: http://backbox.org
Registered: 2013-10-24
Posts: 124
Website

Re: How to install Hiawatha web server, PHP5 and MariaDB.

Hiawatha updated to version 9.7 and first topic too wink.

Offline

#18 2015-05-03 08:22:31

BELZI
Trusted Member
Registered: 2015-05-01
Posts: 17

Re: How to install Hiawatha web server, PHP5 and MariaDB.

Have problem:


[email protected]:~# apt-get install libxslt1.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  libxslt1.1
0 upgraded, 1 newly installed, 0 to remove and 57 not upgraded.
1 not fully installed or removed.
Need to get 254 kB of archives.
After this operation, 500 kB of additional disk space will be used.
Get:1 http://ftp.debian.org/debian/ wheezy/main libxslt1.1 amd64 1.1.26-14.1 [254 kB]
Fetched 254 kB in 0s (1712 kB/s)
Selecting previously unselected package libxslt1.1:amd64.
(Reading database ... 31754 files and directories currently installed.)
Unpacking libxslt1.1:amd64 (from .../libxslt1.1_1.1.26-14.1_amd64.deb) ...
Setting up libxslt1.1:amd64 (1.1.26-14.1) ...
Setting up hiawatha (9.12) ...
Starting webserver: Error binding 0.0.0.0:80
error!

What I have to do?

I tried to change IP adress on my IPv6, and I get this error:


[email protected]:~# service hiawatha start
Starting webserver: Error binding 2a01:4f8:162:732f:4fd::643d.80
error!

Last edited by BELZI (2015-05-03 08:27:05)

Offline

#19 2015-05-03 09:19:39

RyanB
Trusted Member
From: Morphett Vale, SA
Registered: 2013-09-08
Posts: 868

Re: How to install Hiawatha web server, PHP5 and MariaDB.

for the first error, there is more then likely a webserver running already (more then likely apache2 if you haven't installed it yourself beforehand)


Try this.

service apache2 status

if it comes back with something like "apache2 is running" run this

service apache2 stop;chkconfig apache2 off;

for the second error, That would be due to the same reasoning. If it cannot bind Port 80 on IPv4, it cannot bind port 80 of IPv6.

Your configuration should be like so for IPv4 + IPv6 Connectivity

Binding {
        Port = 80
}

Binding {
        Port = 80
        Interface = 2a01:4f8:162:732f:4fd::643d
}

Offline

#20 2015-05-03 10:11:59

BELZI
Trusted Member
Registered: 2015-05-01
Posts: 17

Re: How to install Hiawatha web server, PHP5 and MariaDB.

Thank you.

Ok, it looks like all started successful, but how can I access my website now? When I type http://2a01:4f8:162:732f:4fd::643d it doesn’t forward me on website.

Last edited by BELZI (2015-05-03 10:29:36)

Offline

#21 2015-05-03 10:44:03

RyanB
Trusted Member
From: Morphett Vale, SA
Registered: 2013-09-08
Posts: 868

Re: How to install Hiawatha web server, PHP5 and MariaDB.

IPv6 access is usually like so

http://[IPV6ADDRESS]/

include the brackets.

and make sure you have ipv6 connectivity at home.

Offline

#22 2015-05-03 10:48:41

BELZI
Trusted Member
Registered: 2015-05-01
Posts: 17

Re: How to install Hiawatha web server, PHP5 and MariaDB.

Not working sad Is there any other option to access website? Or how can I setup dns on my domain?

Offline

#23 2015-05-03 11:03:00

RyanB
Trusted Member
From: Morphett Vale, SA
Registered: 2013-09-08
Posts: 868

Re: How to install Hiawatha web server, PHP5 and MariaDB.

Well, it is working

http://www.ipv6proxy.net/go.php?u=http% … &f=norefer

(note: I personally do not have IPv6 at home, nor am i using VPN so, this is my only real option to show with)

Offline

#24 2015-05-07 13:34:10

BELZI
Trusted Member
Registered: 2015-05-01
Posts: 17

Re: How to install Hiawatha web server, PHP5 and MariaDB.

ok, can somebody please write me here (if it’s possible) how can I use my vps as webhost without ipv6 or adding port to the end of ipv4? I want to use my VPS as webhost for my domains. Please help, thanks smile

Offline

#25 2015-05-07 15:01:44

Backtogeek
Low End Boss
From: ~/
Registered: 2013-02-13
Posts: 3,498
Website

Re: How to install Hiawatha web server, PHP5 and MariaDB.

BELZI wrote:

ok, can somebody please write me here (if it’s possible) how can I use my vps as webhost without ipv6 or adding port to the end of ipv4? I want to use my VPS as webhost for my domains. Please help, thanks smile

http://forum.lowendspirit.com/viewtopic.php?id=1152

By adding reverse proxy entries, the node will forward requests for your domains on to your VPS


http://LittleHappyCloud.net KVM VPS with 1TB Bandwidth for €3.00

Offline

Board footer