Answer the question
In order to leave comments, you need to log in
How to access domains on a virtual machine without changing the hosts file in Windows?
Good mood everyone!
There was a need to organize a working environment for web development on a virtual ubuntu (server, version 12) in VirtualBox under Windows 7. Since the virtual server has its own name (let's say local), it was decided to name all domains inside it accordingly (project.local, test.local, username.project.local, etc.).
Actually, against the background of this task, a problem arose - how can you make it so that when you open domains like test.local or, even worse, random-subdomain.test.local, from Windows, the corresponding virtual machine sites open, but at the same time not to was it necessary to make changes to / windows / system32 / drivers / etc / hosts for each new domain on Windows?
The last part of the question is also due to the fact that subdomains can be different, including virtual (dynamic), and hosts in Windows does not support wildcard.
There is a suspicion that for this it will be necessary to raise bind9 on the virtual machine and in Windows, as a dns server, register the address of the virtual machine, but I would like to know alternative ways.
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
But it seems that bind9 is the most correct option, it just might come in handy later =). You will need to create a local zone. and in the config already * A "webserver iP". And it will go to local, and there it will already check with the alias of the web server or application, for example, to django (django-hosts).
Acrylic DNS Proxy allows you to use wildcards in hosts. For example, addresses like "127.0.0.1 *.loc".
Configuring bind9 and specifying the IP address of the virtual machine with it as a second DNS in the Windows settings of the machines would be the most convenient option, in my opinion.
I will not say that it is bad, but the scope is not large and it is not very popular.
Everything is useless on a tablet, in order to learn something, you need to program it right there. Just read - time is wasted.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question