Unable to browse website running on VM from Host

Discussions related to using VirtualBox on Linux hosts.
Post Reply
satimis
Posts: 513
Joined: 12. Jun 2007, 03:41

Unable to browse website running on VM from Host

Post by satimis »

Hi all

VM Ubuntu 20.04 Gnome desktop
Host Ubuntu 18.04 Gnome desktop

I have installed a wordpress website on VM. It can be browsed on local browser-Firefox without problem. However it can't be browsed correctly on Host browser-Firefox, all graphics disappeared.

On Host Firefox running;
http://ip-of-vm

no graphics and following warnings found;

Code: Select all

Skip to primary content
Skip to secondary content
Clicking either of them without result. Please help.

Thanks

Regards
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Unable to browse website running on VM from Host

Post by scottgus1 »

Right-click the guest in the main Virtualbox window's guest list, choose "Show in (whatever-Linux-calls-its-file-&-folder-browser)". Zip the guest's .vbox file, and post the zip file, using the forum's Upload Attachment tab.
satimis
Posts: 513
Joined: 12. Jun 2007, 03:41

Re: Unable to browse website running on VM from Host

Post by satimis »

scottgus1 wrote:Right-click the guest in the main Virtualbox window's guest list, choose "Show in (whatever-Linux-calls-its-file-&-folder-browser)". Zip the guest's .vbox file, and post the zip file, using the forum's Upload Attachment tab.
Hi,

Your requested file is attached here.

Thanks

Regards
Attachments
wp-ub2004pciessd-01.zip
(1.76 KiB) Downloaded 41 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Unable to browse website running on VM from Host

Post by scottgus1 »

Thanks for the .vbox file. Your guest is Bridged to a network adapter called "enp3s0", and from the notes the guest's IP address is supposed to be 192.168.0.181.

See Virtualbox Networks: In Pictures: Bridged Adapter, for how Bridged works, and an issue if you're Bridging to Wi-fi.

Confirm that "enp3s0" is connected and has "192.168.0.###" IP range. Use 'ip' or 'ifconfig' to confirm the host's, LAN's, and guest's IP ranges. The guest, host and LAN should all be 192.168.0.###, or the guest should be getting the same IP range as the host and LAN. The guest should be able to ping the LAN's router. If the guest can ping the router and the host, then Virtualbox's network is working. Bonus points if the host can ping the guest.

If you can get to the guest website but only text shows but not pictures, then Virtualbox's network is working and there are configuration problems in your Wordpress website.
satimis
Posts: 513
Joined: 12. Jun 2007, 03:41

Re: Unable to browse website running on VM from Host

Post by satimis »

scottgus1 wrote: - snip -

If you can get to the guest website but only text shows but not pictures, then Virtualbox's network is working and there are configuration problems in your Wordpress website.
Thanks for your advice.

This is a cloned wordpress website running on Godaddy server. I run All-in-One Migration plugin package of WordPress to export .wpress file and import it on a Ubuntu 20.04 VM on local PC. It has been working for me for prolonged time in the past without problem but on Ubuntu 16.04 VMs and Ubuntu 18.04 VMs respectively. However I find problem on importing it on Ubuntu 20.04 VM.

Problem 1 - The website on VM can't be browsed on Host, with only text displayed.
Problem 2 - I can't change pages on some cloned websites on VMs

I just tested the existing websites running on Ubuntu 18.04 VMs. They worked without problem and can be browsed on Host.

I think I have to give up cloning new website on Ubuntu 20.04 VM and going back to Ubuntu 18.04 VM instead.

Regards
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Unable to browse website running on VM from Host

Post by scottgus1 »

satimis wrote:only text displayed
If any text from the Wordpress website is showing, then Virtualbox and its network is working. You will need to troubleshoot the problems in the Wordpress configuration inside the guest OS itself. Just pretend that Virtualbox was not involved and the Wordpress site is running on a real PC.
satimis
Posts: 513
Joined: 12. Jun 2007, 03:41

Re: Unable to browse website running on VM from Host

Post by satimis »

scottgus1 wrote:
satimis wrote:only text displayed
If any text from the Wordpress website is showing, then Virtualbox and its network is working. You will need to troubleshoot the problems in the Wordpress configuration inside the guest OS itself. Just pretend that Virtualbox was not involved and the Wordpress site is running on a real PC.
Hi,

Following document helps me out. It also works on Ubuntu 20.04

How To Rewrite URLs with mod_rewrite for Apache on Ubuntu 16.04
https://www.digitalocean.com/community/ ... untu-16-04

The problems mentioned on my previous posting solved. Thanks

Regards
Post Reply