P
P
Pavel Osipov2012-04-20 19:55:47
Apache HTTP Server
Pavel Osipov, 2012-04-20 19:55:47

Accessing mysite.localhost from VM?

Good day people
Such a problem: I work in Ubuntu, usually sites are launched as localhost/www.site.com For testing in IE, I keep a couple of operating systems in VirtualPC. Access from it to the site normally works by IP address, something like this: 123.123.123.123/www.site.com

However, here they adjusted the site for support, which otherwise works in LAN.
It was done like this: it
is written in hosts:
127.0.0.1 newsite.localhost

A virtual host is added to httpd-vhosts.conf:
<VirtualHost *:80>
DocumentRoot /opt/lampp/htdocs/newsite.com/site/www
ServerName newsite.localhost


And contact in the end you need it like this:

newsite.localhost

And the question, respectively, is it possible to reach this miracle from the virtual machine?

Thanks in advance for your reply

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DmZ, 2012-04-20
@DmZ

Register in the virtual machine in hosts (in Windows/system32/drivers/etc/hosts in my opinion)
123.123.123.123 newsite.localhost
and reach out in the same way.

B
bost84, 2012-04-20
@bost84

in hosts, you need to prescribe the ip of the PC on which the site is running ; the
virtual OS, respectively, should receive ip from the local network.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question