Score:0

How to get access virtual servers from host machine by domain?

pl flag

I have virtual machine Ubuntu on Windows host machine. On VM there is nginx server with virtual server site.com. VM IP is 127.0.1.1. In VM I edit /etc/hosts:

127.0.1.1 site.com www.site.com

And now I can type in VM browser site.com and get site access. But I want the same on the host machine. I edited Windows hosts file with:

127.0.1.1 site.com www.site.com

But with no result.

  • My VM name has linserver name and in Windows http://linserver open default virtual server (site.com, now it's only).
  • http://127.0.1.1 not working.

VM is VMWare. Virtual Network adapter is NAT, trying change to Bridged but with the same no result.

Nikita Kipriyanov avatar
za flag
VM is a computer on its own with its own network address. It's not a "localhost" which any `127.x.x.x` refers to. Use the IP address that is assigned to the VM. NAT (a.k.a. "user mode networking") certainly complicates things; you need to forward port to your VM. Also, the sole use of the NAT makes the question to not look like it's about running VMs in a business environment. Looks like it's your personal VM. This kind of questions better asked on SuperUser.
m1know avatar
pl flag
Yeah, you absolutely right about that `127.0.1.1` thing — I'm already understand it and now searching information in that direction. And yes, I just doing first steps in web, so it's test VM for learning. Take into account about SuperUser. Thanks for help.
Score:0
pl flag

Instead of 127.0.1.1 writing correct IP-address of VM in Windows hosts and now it works fine.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.