Forum

Serve website via IP address?

Viren Patel
16 March 2012, 20:39
Hiawatha version: 8
Operating System: CentOS 5.7

I have several websites being served via VirtualHost. http://fqdn works great. However http://192.168.1.1 does not work (returns 404 not found). Network and DNS is configured correctly. Can't seem to find the relevant config in the manual. Any ideas? Thanks.

Relevant sections from config file:
Binding {
BindingId = Test
Interface = 192.168.1.1
Port 80
MaxKeepAlive = 30
TimeForRequest = 5, 45
MaxRequestSize = 65536
MaxUploadSize = 64
}

UrlToolkit {
ToolkitID = rewrite
RequestURI exists Return
Match ^/images Return
Match ^/data DenyAccess
Match /(.*) Rewrite /index.php?page=$1
}

VirtualHost {
Hostname = f.q.d.n
RequiredBinding = Test
WebsiteRoot = /var/www
UseToolKit = rewrite
StartFile = index.php
AccessLogfile = /var/log/hiawatha/fqdn_access.log
ErrorLogfile = /var/log/hiawatha/fqdn_error.log
TimeForCGI = 60
ExecuteCGI = yes
UseFastCGI = Test_fcgi
}
Hugo Leisink
16 March 2012, 20:43
The hostname '192.168.1.1' doesn not match any hostname, so Hiawatha will use the default host. Add '192.168.1.1' to the f.q.d.n hostname and it should work:
Hostname = f.q.d.n, 192.168.1.1
This topic has been closed.