Hi Hugo,
Many thanks for your reply and for the sample of code.
I edited my hiawatha.config file using the example you gave as a guide and re-started hiawatha. When I enter my raspi server network address on another machine connected through my local router I see my default web page as expected but when I enter the same address with one of the two port numbers appended I still see my default web page. It seems to direct the browser to the default page regardless of the port number. Valid address/port numbers are 192.168.1.35, 192.168.1.35:80, 192.168.1.35:998 and 192.168.1.35:999 Perhaps I have entered something incorrectly in the config file?
If you have the time perhaps you could have a quick look at my current (experimental) cofiguration file?
# Hiawatha main configuration file
#
# GENERAL SETTINGS
#
ServerId = www-data
ConnectionsTotal = 1000
ConnectionsPerIP = 25
SystemLogfile = /var/log/hiawatha/system.log
GarbageLogfile = /var/log/hiawatha/garbage.log
#
#
# BINDING SETTINGS
# A binding is where a client can connect to.
#
Binding {
Port = 80
}
Binding {
Port = 998
BindingID = port_998
}
Binding {
Port = 999
BindingID = port_999
}
#
#
# DEFAULT WEBSITE
#
Hostname = 192.168.1.35
WebsiteRoot = /var/www/hiawatha
StartFile = index.html
AccessLogfile = /var/log/hiawatha/access.log
ErrorLogfile = /var/log/hiawatha/error.log
ErrorHandler = 404:/error_default.html
# VIRTUAL HOSTS
# Use a VirtualHost section to declare the websites you want to host.
#
#Virtual host 1
#
VirtualHost {
Hostname = 192.168.1.35
WebsiteRoot = /var/www/v1
RequiredBinding = port_998
AccessLogfile = /var/log/hiawatha/virtual1_access.log
ErrorLogfile = /var/log/hiawatha/virtual1_error.log
ShowIndex = yes
ErrorHandler = 404:/error_v1.html
}
#
#Virtual host 2
#
VirtualHost {
Hostname = 192.168.1.35
WebsiteRoot = /var/www/v2
RequiredBinding = port_999
AccessLogfile = /var/log/hiawatha/virtual2_access.log
ErrorLogfile = /var/log/hiawatha/virtual2_error.log
ShowIndex = yes
ErrorHandler = 404:/error_v2.html
}
#
I also found a reference to port based virtual hosts in a message from Douglas Hubler (time-stamp 3 February 2012, 10:03) but the sysntax was slightly different and perhaps for an earlier version of Hiawatha?
Kind regards,
raspiham