Whether all Virtual Hosts Apache copy to Windows hosts?

I have WAMP.
I noticed that adding a virtual host using WAMP native utility leads to duplication of entries in the httpd-hosts.conf and Windows hosts file. While manually adding ServerAlias in the config isn't working as well as changing the ServerName. Need a similar entry in hosts
1. Do I understand correctly that when the browser requested hostname.com he first goes to the hosts, there is specified on Apache, that takes hostname.com and already it redirects to locallow directory?
2. Do I understand correctly that any it is necessary to register ServerAlias always hosts an extra entry?
2. Do I understand correctly that if host not in hosts, then the browser goes to the DNS specified in the settings Windows, so not exactly WAMP?
3. Do I understand correctly that the local resolution of the host in its absence, the hosts are only possible if we give the tinctures Windows DNS Or DNS the Apache web server is generally not designed for this, so it is necessary to put even some intermediate DNS?

So not going to bother, interested in principle.
June 3rd 19 at 19:11
2 answers
June 3rd 19 at 19:13
1. Yes
2. If we're talking about local development, then Yes.
3. Yes, in that order
4. If the settings specify DNS to, the browser will contact port 53 on localhost, it should work DNS-server. To develop this once, because you need to set additional service. Apache and DNS are not connected in any way.
June 3rd 19 at 19:15
Normal DNS client first reads the hosts then checks the local cache, then accesses the DNS server.
Accordingly, if you do not register anywhere domain, the DNS client can not find it.

Instead of having to pick up a local DNS server on which to register a fake domain name - the cheapest way to fix the hosts file

Find more questions by tags Domain name systemWindowsApacheWAMPLocal server