Hi everybody,
I am trying to create two diferent web sites in my hiawatha server, each of them in a different port.
I am using VirtualHost for that and as soon as I define the IP address of the server is working fine.
The thing is, that the server is taking different IP address all the time, so I would like to configure the virtual hosts for ANY IP I tried with "hostname = * " but it's not working. Any idea.
In my configuration file I am first defining two bindings (one per port)
# BINDING SETTINGS
# A binding is where a client can connect to.
#
#port 8001, the website for merlin
Binding {
BindingID = port8001
Port = 8001
EnableAlter= yes
MaxRequestSize= 2048
MaxUploadSize= 10
MaxKeepAlive = 240
TimeForRequest = 240,240
}
#port 80, the website for the user
Binding {
BindingID = port80
Port = 80
EnableAlter= yes
MaxRequestSize= 2048
MaxUploadSize= 10
MaxKeepAlive = 240
TimeForRequest = 240,240
}
And them the default site and the virtual hosts like this
# DEFAULT WEBSITE
# It is wise to use your IP address as the hostname of the default website
# and give it a blank webpage. By doing so, automated webscanners won't find
# your possible vulnerable website.
#
Hostname = 127.0.0.1
WebsiteRoot = /usr/local/var/www/hiawatha
#StartFile = index.py
StartFile = test.hmtl
AccessLogfile = /usr/local/var/log/hiawatha/access.log
ErrorLogfile = /usr/local/var/log/hiawatha/error.log
#ErrorHandler = 404:/error.cgi
# VIRTUAL HOSTS
# Use a VirtualHost section to declare the websites you want to host.
#
#VirtualHost {
# Hostname = www.myDomain.com
# WebsiteRoot = /var/www/my-domain/public
# StartFile = index.php
# AccessLogfile = /var/www/my-domain/log/access.log
# ErrorLogfile = /var/www/my-domain/log/error.log
ExecuteCGI = yes
# FastCGI = PHP4
TimeForCGI = 240
#}
VirtualHost {
Hostname = *
RequiredBinding = port8001
WebsiteRoot = /usr/local/var/www/hiawatha
AccessLogfile = /usr/local/var/log/hiawatha/access.log
ErrorLogfile = /usr/local/var/log/hiawatha/error.log
ShowIndex = yes
ExecuteCGI = yes
}
VirtualHost {
Hostname = *
RequiredBinding = port80
WebsiteRoot = /usr2
AccessLogfile = /usr/local/var/log/hiawatha/access.usr2.log
ErrorLogfile = /usr/local/var/log/hiawatha/error.usr2.log
ShowIndex = yes
ExecuteCGI = yes
}
Hiawatha version: 6.14.1
Operating System: Puppy linux 214