-1

I'm using VirtualBox on a Mac. I have a virtual machine running Linux on which I'm developing a website. Its hosts file has:

127.0.0.1 localhost
127.0.1.1 my-test-site.gyford.com

I can then access http//my-test-site.gyford.com on my Mac's browser.

But I also have some Windows virtual machines from https://modern.ie/ for browser testing and would like to access the same website from IE in those machines.

I've tried adding

127.0.1.1 my-test-site.gyford.com

to the Windows machines' host files, but as I expected, it can't find the site.

Is there a way to access the website running on the Linux virtual machine from the Windows virtual machine?

migrated from serverfault.com Sep 23 '14 at 16:38

This question came from our site for system and network administrators.

  • If the server is the virtual machine then you need to add the virtual machine's local LAN ip address to the hosts file which of course is NOT 127.0.0.1 – Ramhound Sep 23 '14 at 17:40
  • Are these guests configured with network interfaces? How are the network interfaces configured? Are they set for NAT, or bridged, or something else? – Kenster Sep 23 '14 at 23:27
  • @Ramhound - The server is on a virtual machine and the client is on a different virtual machine. – Phil Gyford Sep 24 '14 at 8:16
  • @Kenster - Both virtual machines are on NAT at the moment, which seems to be default. – Phil Gyford Sep 24 '14 at 8:18
  • 127.0.0.1 is the localhost which isnt valid beyond the machine itself – Ramhound Sep 24 '14 at 10:23
0

try this:

  1. Configure your Linux VM: VirtualBox -> Settings -> network -> Bridged adapter. Now, your Linux machine have unique IP. Example: 10.6.204.58

  2. In your Windows machine: prompt -> ping 'Linux IP number'. Example: ping 10.6.204.58. If listen, then OK!!!

  3. Open Explorer browser and change the address 127.0.0.1 (localhost) to Linux IP. Example: 10.6.204.58/nameApp

-1

127.0.1.1 is a localhost and it will not open the Website built in linux. Please try adding the IP of Website(Public IP/Static IP of that website) and save the hosts file. Then check the workablitiy!

  • I don't quite understand... As I understand it the website doesn't have a public IP address - it's just hosted on a virtual machine on my laptop. Can you be more specific? – Phil Gyford Sep 24 '14 at 8:19
  • Then use the local ip address of the Linux box and adjust it in the hosts file. – Smeerpijp Nov 5 '15 at 15:29

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.