Forum

Hiawatha Hostname on Windows

Fred
22 June 2016, 16:54
Hi Hugo,

I have been using Hiawatha successfully on windows but as I get more and more sites, I am finding it hard to keep up with the Hostname IPs.

On windows, is it possible to set
Hostname = somename
instead of
Hostname = 127.0.0.2

Here is what I have now
[...]
# 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 = C:\Hiawatha\htdocs
StartFile = index.shtml
UseLocalConfig = yes
ShowIndex = yes
TimeForCGI = 15
UseFastCGI = PHP5_SHTML
DenyBody = ^.*%3Cscript.*%3C%2Fscript%3E.*$
ExecuteCGI = yes
PreventCSRF = yes
PreventSQLi = yes
PreventXSS = yes
AccessLogfile = INSTALL_DIR\logfiles\access.log
ErrorLogfile = INSTALL_DIR\logfiles\error.log

VirtualHost {
Hostname = mydomain
#EnforceFirstHostname = yes
WebsiteRoot = C:\Hiawatha\htdocs\equifloor
StartFile = index.shtml
UseLocalConfig = yes # Tell Hiawatha to use or ignore .hiawatha files
[...]

I would like
# 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 = C:\Hiawatha\htdocs
StartFile = index.shtml
UseLocalConfig = yes
ShowIndex = yes
TimeForCGI = 15
UseFastCGI = PHP5_SHTML
DenyBody = ^.*%3Cscript.*%3C%2Fscript%3E.*$
ExecuteCGI = yes
PreventCSRF = yes
PreventSQLi = yes
PreventXSS = yes
AccessLogfile = INSTALL_DIR\logfiles\access.log
ErrorLogfile = INSTALL_DIR\logfiles\error.log

VirtualHost {
Hostname = 127.0.0.2
#EnforceFirstHostname = yes
WebsiteRoot = C:\Hiawatha\htdocs\equifloor
StartFile = index.shtml
UseLocalConfig = yes # Tell Hiawatha to use or ignore .hiawatha files
[...]

When I tried to use a string for the Hostname, I wasn't able to reach http://mydomain
Hugo Leisink
22 June 2016, 21:53
If you only work on your local machine, add the hostname you want to use to the hosts file. This file can be found in C:\Windows\System32\drivers\etc.
Fred
23 June 2016, 13:47
Worked perfectly
This topic has been closed.