Access site on linux VM from host browser

Hi Ben,
so when I have connected to websites running on local VMs in the past, I have simply typed “vm-name:port” and as long as I have set up the VM firewall properly (or switched it off!) then up comes the website.
Now nginx in Local is listening on port 80. So by previous experience, typing to “vm-name” into the browser should work as the default is 80.
But does the addition of Local into the mix change things? For instance I have just noticed that if I use the browser on the VM and type “localhost”, I get the 404 screen from Local.
So it looks as though things are different with Local.
Anyway, I tried updating the PC hosts file with the VM-IP-address site_name.local and use site_name.local in the PC browser and connection timed out. Which makes sense.

I wonder if what is happening is that Local gets between nginx and the outside world. So when Local sees site.local, it can then pass that onto nginx. Hence localhost:80 will not work because Local is being bypassed and nginx is not getting the site.local. And there does not seem to be a way of of combining the VM IP address and the Local site name.

Still not to worry, it was a “nice to have” feature rather than an essential.

There is a post on this - Access the site in local network which does suggest what you suggest. I use VMware rather than VirtualBox and my VMs are always bridged so they have their own IP address from the router.