`

在自己的主机上配置域名

阅读更多
项目开发调试过程中,我们对工程进行访问时,一般都是采用在地址栏直接输入本机的IP地址,曾经想过要是也能像访问http://www.chinaunix.net/ 一样那就爽了,后来同事告诉我,其实是很简单!
现将设置方式介绍如下:

进入C盘如下目录:
C:\WINDOWS\system32\drivers\etc
 
找到文件:hosts
 
用写字板打开该文件
 
此时你会看到以下内容:
hosts 代码
  1. ***********************************************************************   
  2.     
  3. # Copyright (c) 1993-1999 Microsoft Corp.   
  4. #   
  5. # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.   
  6. #   
  7. # This file contains the mappings of IP addresses to host names. Each   
  8. # entry should be kept on an individual line. The IP address should   
  9. # be placed in the first column followed by the corresponding host name.   
  10. # The IP address and the host name should be separated by at least one   
  11. # space.   
  12. #   
  13. # Additionally, comments (such as these) may be inserted on individual   
  14. # lines or following the machine name denoted by a '#' symbol.   
  15. #   
  16. # For example:   
  17. #   
  18. #      102.54.94.97     rhino.acme.com          # source server   
  19. #       38.25.63.10     x.acme.com              # x client host   
  20. 127.0.0.1       localhost   
  21.     
  22. ***********************************************************************  
 
接下来该怎么办,不用说了吧 ^ ^ !哈哈哈哈,竟然这么简单................

相关推荐

Global site tag (gtag.js) - Google Analytics