1

I have prepared a VM webserver with Ubuntu server to allow a client to view his 2 retired websites on his PC.

The host is Windows, the VM is configured with port forwarding, and this all worked perfectly on 2 computers: The one I set it up on, and my home desktop on which I tested importing the VM in hopes of finding any gotchas prior to going onsite.

Having added URLs for 127.0.0.1 to the hosts file on each machine I was able to access the websites as expected.

However, when I imported the VM on the client's Host PC and checked all config matched, I am unable to access the sites in a browser (tried 2 + incognito), receiving a 404 not found error.

Settings and config for the VM are fairly basic:

  • Ubuntu server V22 with Apache and MySQL.
  • Hosting 2 fairly basic WordPress websites.
  • NAT, using Default Adapter (Intel PRO/1000 MT Desktop (8254OEM)).
  • Port Forwarding [name: Apache, Protocol TCP, Host IP: 127.0.0.1, Host Port: 80, Guest IP 10.0.2.15, Guest Port: 80].
  • No firewall .

On the host:

  • Hosts file: 127.0.0.1 website1.local, 127.0.0.1 website2.local
  • pinging e.g. website1.local hits 127.0.0.1 successfully.

Also, the VM internet access is working.

The only difference I noticed on the client's host is Norton 360, but I tried temporarily disabling the firewall and active protection functions and this did not appear to make any difference.

After doing some research I tried changing the adapter to the "paravirtualized network" option but again, no joy.

I have read that maybe using port 80 is a problem, but this worked flawlessly on 2 computers so it seems unlikely that this is the problem (but if anyone can explain why it still might be and provide instructions to get around it, I'm willing to try!)

My guess is that it's most likely something to do with his network or PC security settings, but I don't know enough about those areas to know where to look next. Any suggestions?


Update: I have now set this up on 3 computers successfully - I tried one which I haven't done any significant development work on in case there was something in my own environment helping it work.

I also tried

  • checking that port 80 is open on the Host machine using telnet (yes)
  • successfully connected to the VM from the Host via SSH
  • Modified the Apache config to use port 8080 (worked on mine, but not his)

If I understand correctly, 404 error indicates that a connection to the server itself is successful, but it is unable to find the resource, can someone confirm whether that is correct?

0

0

You must log in to answer this question.

Browse other questions tagged .