Forum

Help with virtual host

Douglas Hubler
3 February 2012, 10:03
Hello,

I am trying to create two diferent web sites in my hiawatha server, with different ports. One of them is default, the other is virtual host. But i can not reach virtual one. Hostname should be loopback. Here is my configuration file: I can not attach my conf file. When i copy its content it says message seen as spam??


Hiawatha version: v7.3
Operating System: Linux 2.4.25 ppc
Douglas Hubler
3 February 2012, 10:34
Binding {
BindingID = port3802
Port = 3802
}
Binding {
BindingID = port3803
Port = 3803
}
Douglas Hubler
3 February 2012, 10:35
? think i can post the code part by part
ConnectionsTotal = 150
ConnectionsPerIP = 10
SystemLogfile = /a/srv/var/log/system.log
GarbageLogfile = /a/srv/var/log/garbage.log

Binding {
BindingID = port3802
Port = 3802
}
Binding {
BindingID = port3803
Port = 3803
}

CGIhandler = /a/srv/bin/ssi-cgi:shtml
CGIextension = cgi
TimeForCGI = 120
Douglas Hubler
3 February 2012, 10:36
Sorry for dirty post but i find out the problem. here is my conf file
# Hiawatha main configuration file
#

# GENERAL SETTINGS
#
ConnectionsTotal = 150
ConnectionsPerIP = 10
SystemLogfile = /a/srv/var/log/system.log
GarbageLogfile = /a/srv/var/log/garbage.log

# BINDING SETTINGS
#
Binding {
BindingID = port3802
Port = 3802
}
Binding {
BindingID = port3803
Port = 3803
}

# COMMON GATEWAY INTERFACE (CGI) SETTINGS
#
CGIhandler = /a/srv/bin/ssi-cgi:shtml
CGIextension = cgi
TimeForCGI = 120

# DEFAULT WEBSITE
#
Hostname = 127.0.0.1
WebsiteRoot = /a/srv/var/www
StartFile = index.shtml
AccessLogfile = /a/srv/var/log/access.log
ErrorLogfile = /a/srv/var/log/error.log
ExploitLogfile = /a/srv/var/log/exploit.log
ExecuteCGI = yes

VirtualHost {
Hostname = localhost
WebsiteRoot = /a/srv/var/www/dummy
RequiredBinding = port3803
StartFile = index.shtml
AccessLogfile = /a/srv/var/log/access.log
ErrorLogfile = /a/srv/var/log/error.log
ExecuteCGI = yes
}
Hugo Leisink
3 February 2012, 11:24
You mean it's working now and don't need help anymore?
Douglas Hubler
3 February 2012, 12:32
Its not working for 3803.
Douglas Hubler
3 February 2012, 12:34
I made virtualhost hostname 127.0.0.1 but i didn't work again. But it should be work with loopback.
Douglas Hubler
6 February 2012, 13:10
I still couldn't find out why i can not connect from second port. Can you help me with this problem,please?
Hugo Leisink
6 February 2012, 13:27
When receiving a request, Hiawatha will look for a website configuration (both default website and virtual host) that has a matching hostname. It will course take the RequiredBinding setting in account. If no matching hostname is found, it will show the default website.

Looking at your configuration, the default website should be reachable via http://127.0.0.1:3802. The virtual host should be reachable via http://localhost:3803. If you connect to port 3803 and use a hostname other than 'localhost', the default website will be shown.
This topic has been closed.