Virtualbox: connect from guest OS to host's OS apache virtual hosts

1

I know that it is possible to access host machine's localhost using gateway's IP 10.0.0.2, but I have several hosts I need to access from guest. Example of hosts-file:

127.0.0.1   localhost
127.0.0.10  my-domain-one.tld
127.0.0.11  my-domain-two.tld
...
127.0.0.20  my-domain-ten.tld

My host OS is Win8, guest - Ubuntu.

yanot

Posted 2015-01-05T18:56:25.700

Reputation: 13

Answers

0

I'd use Apache virtual hosts on host Web server. Access each vhost with a port. Then type host ip followed by port, to access a vhost from guest machine.

skyrail

Posted 2015-01-05T18:56:25.700

Reputation: 114

I use Apache hosts on host OS and need to use them on guest OS the same way. Using different ports for each host is too inconvenient... – yanot – 2015-01-05T20:13:37.830

I thought, if there is no better way (but I hope there is), I'll share my htdocs directory with guest OS and run Apache there... – yanot – 2015-01-05T20:18:56.410