C
C
camradee2018-03-05 17:06:20
virtual box
camradee, 2018-03-05 17:06:20

How to configure VirtualBox/Windows 10 to see a website running on a virtual machine inside the local network?

I tried various settings and their combinations, it did not help, for example, I changed the 2 Hosted-only adapter to Bridged adapter in virtualbox. I would be grateful for detailed instructions on how to do this (I have not done such things before), so that you can see the site being developed from another computer within the network.
Settings and environment:
Vagrant 2.0.2, VirtualBox 5.2.6, Windows 10, config.yaml:
vagrantfile:
5a9d4e387fca4224808199.png5a9d4dbf490a3428583799.png5a9d4dc907d92522715546.png
In addition:
192.168.100.100 site.loc is written in the hosts file,
but the router assigns addresses like 192.168.X.XXX - do I need to change the entry in hosts to 192.168.1.100 site.loc in this case?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vreitech, 2018-03-05
@fzfx

adapter type - bridged adapter.
Specify the ip-address of the virtual machine from the same subnet as the ip-address on the host system. subnet mask, gateway, dns-server specify the same as on the host system.
in the settings of the web server on the virtual machine, bring the settings to the form in which the web server will wait for requests to the ip-address of the virtual machine.
The hosts file must contain the ip-address of the virtual machine.
the hosts file must be changed on those machines from which you need access to the site.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question