Recently I set up a Dokuwiki installation on Ubuntu Server in VirtualBox. My host OS is Ubuntu 11.10. Till date I was using NAT configuration for my VirtualBox. Since today I decided to use Host-only networking as I did not want the wiki access to outside world. When I was using the NAT method I could access my wiki with this URL: http://localhost:8080/dokuwiki/doku.php. However after I switched to host-only way I am not able to do it.
After seeing instructions elsewhere I realized that using http://192.168.56.101/dokuwiki/doku.php helps but it did not help me. As instructed here, How can I access Apache (on VirtualBox guest) from host? I tried adding following line to my hosts file
Accessing with IP address in the URL would be OK, but I would like to know how I can set custom domain name for use.
Update: As suggested by R.K. I restarted both virtual and physical machines. Then I observed that before connecting to Internet the wiki is accessible with http://192.168.56.101/dokuwiki/doku.php or http://userver/dokuwiki/doku.php. Once I connect to the web using my USB dongle(I use
wvdial) the wiki becomes inaccessible.