site  contact  subhomenews

Basic setup of Hiawatha

July 17, 2009 — BarryK
Ok, so it is very difficult to setup Hiawatha. I had the upgraded PPLOG script working, now it doesn't -- very frustrating. So, I am now going through setting up Hiawatha step by step. Firstly, just to get a 'index.html' page displaying...

1. Create user and group
I am starting from scratch, to make sure everything is right:

# addgroup -g 504 webgroup
# adduser -h /root/Web-Server -s /bin/sh -G webgroup -D webuser


The directory /root/Web-Server gets created, with these permissions:

# ls -l /root/Web-Server
drwxr-sr-x 2 webuser webgroup 1024 2009-07-17 08:50 /root/Web-Server


...that means it has permissions rwx r_x r_x (755) and the SGID flag is set.

These lines got added to these files:

/etc/group webgroup:x:504:
/etc/gshadow webgroup:!::
/etc/passwd webuser:x:1002:504:Linux User,,,:/root/Web-Server:/bin/sh
/etc/shadow webuser:!:14442:0:99999:7:::


2. Configure Hiawatha
I created /etc/hiawatha/httpd.conf with just this in it:

ServerId = webuser

ConnectionsTotal = 150
ConnectionsPerIP = 10
SystemLogfile = /var/log/hiawatha/system.log
GarbageLogfile = /var/log/hiawatha/garbage.log

Binding {
Port = 80
Interface = 127.0.0.1
}

Hostname = 127.0.0.1
WebsiteRoot = /root/Web-Server
StartFile = index.html
AccessLogfile = /var/log/hiawatha/access.log
ErrorLogfile = /var/log/hiawatha/error.log


3. Test
I placed an 'index.html' file into /root/Web-Server and set its permissions:

# chown webuser:webgroup /root/Web-Server/index.html
# chmod 644 /root/Web-Server/index.html


Then the actual test:

# hiawatha
# mozilla http://127.0.0.1:80/index.html


...yay, it works!

Now I shall attempt to get PPLOG running...

Tags: woof