access host website from virtualbox machine

28 October 2017, 05:55

I am trying to access my host's Hiawatha website from my VirtualBox machine.
In the VirtualBox machine I access, (the gateway's address in the virtual machine mapping to the host's local address)
On the host I have configured:
* a default Website with Hostname =
* a VirtualHost with Hostname =,

The access logs show that accessing from ends up in the default Website and shows in the log : - - [28/Oct/2017:14:28:08 +0100] "GET / HTTP ...

My question: if the log shows why does it end up in the default website?
I would like to access the VirtualHost. How can I catch it then?
Accessing my website from the host using correctly accesses the VirtualHost

Thanks for your help
28 October 2017, 18:54
I am therefore accessing the webserver from a virtual machine on (VirtualBox network NAT configuration), the site is served by the host.
I have tried a VirtualHost with Hostname=,,localhost,
but still can't catch it and the webserver ends up on the default website.
Where can I see the Hostname actually used for this local connection that I should use for the VirtualHost?

Hugo Leisink
29 October 2017, 20:46
I have no idea why it doesn't work. Hiawatha's (virtual) host matching works as intended. You're sure you didn't make any typo somewhere?
30 October 2017, 08:35
yes I agree it is probably something stupid on my side.

I thought VirtualBox NAT was just mapping the guest to the host but it seems there is something else otherwise it would end up in my Virtualhost referencing

Therefore, where can I see the exact address as used for host matching? I want to see the actual name that ended up in default so that I can redirect it to the VirtualHost instead.

Hugo Leisink
30 October 2017, 08:46
It should be visible in the access logfile. Look for a header named 'Host:'.
30 October 2017, 20:58
Sorted out in 1 min thanks to your help:
I switched to the Hiawatha log instead of the extended log to get more information and see the Host which was missing in the extended log.
I could spot that the host used was - the one typed in the browser before conversion by the VirtualBox NAT into
After forcing a refresh of the browser, I eventually got access to the VirtualHost!
Conclusion: use the default hiawatha log format to get more information for debug, it is the best and most readable format!

[the topic can be closed]
Chris Wadge
31 October 2017, 10:36
Note that VirtualBox interfaces can also be run in bridged network mode, which avoids NAT problems entirely.
This topic has been closed.