How to change localhost to www.dev.com on this machine

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.