M
M
Maxim Grudin2014-06-18 23:27:43
virtual box
Maxim Grudin, 2014-06-18 23:27:43

How to access a web server installed on a virtual machine?

The situation is this.
Windows 7 SP1 x64 host OS has virtualbox installed with guest archlinux.
In the guest OS, the network works fine. For the Internet there is an adapter with NAT, for communication with the host there is an additional adapter of the "host only" type.
There is also Ruby on Rails with web site projects. And when running the native WEBrick server in a virtual machine, everything works fine.
But how to access this server and open the site in the host's browser?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
3
386DX, 2014-06-18
@GMax

man port forwarding. In the Vb network settings, forward port 8080 to guest 80, there will be access to 127.0.0.1:8080 from the host

A
Andkon, 2014-06-19
@Andkon13

Register on on a Windows wheelbarrow in hosts [address of the guest machine] [site address] does not work?
type c:/windows/system32/driver/etc/hosts
192.168.1.2 test.site
and on the guest
/etc/hosts
127.0.0.1 test.site

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question