Situation:
I have Ubuntu 20.04 server inside Vbox6.1 with an Ubuntu 20.04 Desktop Host. Host-Guest communications are configured correctly using vboxnet0 adapter. I can readily ping the static ip of the guest from the host's command line.
Problem:
I recently install a server control panel on the guest and oddly enough, I can only reach access the server control from my host's web browser only using the ip address, not its domain name. For exmaple:
https://192.168.62.87:3080
correctly displays control panel, whereas
https://example.com:3080
has Firefox's "Hmm. We’re having trouble finding that site." error message.
Solutions that I have tried:
1.) First, I tried the obvious. I edited my /etc/hosts
file to have
192.168.62.87 example.com
didn't work
2.) Next, I tried installing avahi-daemon on the guest server as follows:
sudo apt-get install avahi-daemon
& rebooted the guest <-didn't work
Does anyone know how I can get my vbox domain names visible to my host? thanks
Update @Gaétan RYCKEBOER Advice below, revealed something useful.
when I ran dig example.com
it revealed that my host is trying to resolve example.com using my PROD server's nameserver, which means of course the control panel will not load because **test**.example.com
doesn't exist on y prod server.
It seems that 192.168.62.87 example.com
in my /etc/hosts
file is being ignored.
This is what I need to correct.
NOTE: my ubuntu test server does have bind9 installed and it is running correctly.