主题 : 本地测试多域名配置方法
级别: 超级版主
UID: 2
积分:3053 加为好友
威望: 24 精华: 5
主题:207 回复:1329
注册时间:2009-06-02
在线时长:11
1#   发表于:2012-07-20 11:35:52  IP:115.170.*.*
很多的用户在测试jeecms子站点时,会碰到不会配置本地域名的问题,现在,我将基本的本地多域名配置方法写出来,供大家参考:

首先按路径C:\WINDOWS\system32\drivers\etc打开文件夹,找到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

只要在下面添加您需要的域名即可:
# 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
127.0.0.1       localhost1
127.0.0.1       localhost2
127.0.0.1       localhost3
127.0.0.1       localhost4
朝闻道,夕死可矣。
1 共1页