在自己的主机上配置域名
2017-04-06 15:54
162 查看
项目开发调试过程中,我们对工程进行访问时,一般都是采用在地址栏直接输入本机的IP地址,曾经想过要是也能像访问http://www.chinaunix.net/ 一样那就爽了,后来同事告诉我,其实是很简单!
现将设置方式介绍如下:
进入C盘如下目录:
C:\WINDOWS\system32\drivers\etc
找到文件:hosts
用写字板打开该文件
此时你会看到以下内容:
hosts 代码
***********************************************************************
# 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 should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should 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
***********************************************************************
接下来该怎么办,不用说了吧 ^ ^ !哈哈哈哈,竟然这么简单................
现将设置方式介绍如下:
进入C盘如下目录:
C:\WINDOWS\system32\drivers\etc
找到文件:hosts
用写字板打开该文件
此时你会看到以下内容:
hosts 代码
***********************************************************************
# 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 should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should 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
***********************************************************************
接下来该怎么办,不用说了吧 ^ ^ !哈哈哈哈,竟然这么简单................
相关文章推荐
- apache服务器配置虚拟主机,使用自己的域名
- 配置自己的主机名(域名)
- 基于IP,基于port和基于域名的三种虚拟主机的配置方法
- apache基于IP,port和域名三种虚拟主机配置方法
- (转)Tomcat6 配置多虚拟主机,多域名绑定一IP
- 在RHEL5下构建LAMP网站服务平台之编译安装Apache与配置基于域名的虚拟Web主机
- weblogic 10 虚拟主机多域名配置
- win+apache下配置虚拟主机和绑定域名
- 【Nginx】配置基于域名的虚拟主机
- 基于IP,基于port和基于域名的三种虚拟主机的配置方法
- Apache2.2.x+tomcat单IP多域名多站点的虚拟主机配置详解(win2003环境)
- Apache2.2.x+tomcat单IP多域名多站点的虚拟主机配置详解(win2003环境)
- Linux下的域名虚拟主机的配置
- windows2003下apache配置虚拟主机和绑定域名服务
- 设置自己的域名在局域网中访问.DNS及IIS配置
- (转)Tomcat6 配置多虚拟主机,多域名绑定一IP
- 在虚拟主机不支持泛域名绑定的情况下实现自己的域名转发
- 如何配置apache一个ip多域名的虚拟主机?
- Tomcat6 配置多虚拟主机,多域名绑定一IP
- Apache2.2.x+tomcat单IP多域名多站点的虚拟主机配置详解(win2003环境)