Modify the default localhost name of IIS

Source: Internet
Author: User

I used to see the http: // localhost in the local test domain name, want to write the line is not good, for example, want to become a http://www.ceo.com, but Web access is still the original http: // localhost content, how can this problem be achieved?

You can modify a local file.

The following path in the System Disk:

C: \ windows \ system32 \ drivers \ etc

Find the "hosts" file, right-click it, and select the text file mode. The following content is displayed:

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample hosts file used by Microsoft TCP/IP for Windows.
#
# This file contains the Mappings of IP addresses to host names. Each
# Entry shoshould be kept on an individual line. The IP address shold
# Be placed in the first column followed by the corresponding host name.
# The IP address and the host name shocould be separated by at least one
# Space.
#
# Additionally, comments (such as these) may be inserted on individual
# Lines or following the machine name denoted by a' # 'symbol.
#
# For example:
#
#102.54.94.97 rhino.acme.com # source server
#38.25.63.10 x.acme.com # X client host

127.0.0.1 localhost

See it. There is a line at the bottom.

127.0.0.1 localhost

Do you know how to do this?

Add a new line in this line and change localhost to the desired domain name, as shown below:

127.0.0.1 www.ceo.com

Note that "127.0.0.1" and "www.ceo.com" are separated by the tab key.

Add the domain name you want to add.

Save the settings and then use www.ceo.com to access your local website.

 

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.