在windows 目录下可以找到一个叫hosts的文件,
用记事本打开,在里面加上一行:
192.168.1.1     www.my.com就可以了,比如:# 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 host127.0.0.1       localhost
192.168.1.1     www.my.com

解决方案 »

  1.   

    按照wellsoon和ysqu的方法没错。需要知道的是,windows上的域名搜索顺序是先HOST搜索再DNS查询,所以,象你这样调试只是为了一个友好的URL的话,按照wellsoon的方法就足够了。如果你要放到internet服务器上去,当然就要申请域名了。
      

  2.   

    2000的话,可以配自己的DNS。然后把网卡的DNS设置成本机的IP。就可以了。
      

  3.   

    Faint...
    Apache可以建立域名,闻所未闻。
      

  4.   

    似乎只要DNS服务器设好了就行了。
    和APACHE的关系不大,除非要用虚拟主机
      

  5.   

    可以,首先你得将tomcat和Apache整合,至于整合的方法网上有比较详细的措施,在此就不多说了。在你的Apache设置的时候,设置虚拟主机,编辑Apache 安装目录下的\conf\httpd.conf 找到 #NameVirtualHost * 修改为 NameVirtualHost 192.168.1.1 #注意这个IP为你自己主机设的IP 找到 ServerName www.my.com
    修改为 #ServerName www.my.com添加 <VirtualHost 192.168.1.1> ServerAdmin root@localhost ServerName www.my.comDocumentRoot c:/apache/htdocs ErrorLog c:/apache/logs/error_log TransferLog c:/apache/logs/access_log ScriptAlias /cgi-bin c:/apache/cgi-bin </VirtualHost> 改完之后,再设置一下浏览器里的internet选项中的居域网设置,将代理服务器设置为192.168.1.1 端口80
    这样就可以使用http://www.my.com的形式来访问了,祝你成功!
      

  6.   

    那SERVLET怎么设置,比如说HTTP://127.0.0.1:7001/AA
      

  7.   

    如果在2000server下,您直接可以配置dns
      

  8.   

    先配置自己的DNS服务器,加入你的192.168.1.1地址以及www.my.com域名。然后在IP属性里指定用你自己的DNS服务器