After installing the server on Windows, open the local directory C:\Windows\System32\drivers\etc\ , you will see a Hosts file, open after the code is:
# Copyright (c)1993- theMicrosoft corp.## This isA sample HOSTS file used by Microsoft TCP/IP forwindows.## This file contains the mappings for IP addresses to host names. each# entry should is kept on a individual line. The IP address should# be placedinchThe first column followed by the corresponding host name.# the IP address and the host name should is separated by at Least one# space.## Additionally, comments (such asthese) May is inserted on individual# lines or following the machine name denoted by a'#'symbol.## for example:##102.54.94.97rhino.acme.com # source server#38.25.63.10x.acme.com # x client host# localhost name resolution ishandled within DNS itself.#127.0.0.1localhost#::1localhost
At the bottom of this we add
127.0. 0.1 Www.dev.com
Note that at this time can not have a semicolon, so that when we visit www.dev.com, in fact, the open is localhost, even if the line already has www.dev.com this domain name, open is also host on 127.0.0.1 this host.
How to change localhost to www.dev.com on this machine