apache配置,配置二级域名的问题

apache配置,配置二级域名的问题

apache配置文件httpd.conf中的已有配置如下:

[复制到剪切板]
CODE:
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName localhost:80

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "E:/www/httpd"

<Directory "E:/www/httpd">
    
#
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    
Options Indexes FollowSymLinks Includes ExecCGI
   
    
#
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    
AllowOverride None

    
#
    # Controls who can get stuff from this server.
    #
    
Order allow,deny
    Allow from all

</Directory> ;

现在想加一个二级域名,怎么配置?
(主域名没有在httpd.conf文件中配置,只是解析到空间的IP上了)
请问如何添加一个二级域名?

假设:
主域名为www.aben.com(对应的物理路径为:E:/www/httpd)
空间IP为:210.120.110.119
现在想加增加的二级域名为:hao.aben.com
二级域名所对应的物理路径为:E:/www/httpd/hao

请高手赐教,救命啊,在线等

NameVirtualHost 210.120.110.119:80

<VirtualHost 210.120.110.119:80>
    DocumentRoot E:/www/httpd
    ServerName aben.com
    ServerAlias www.aben.com
</VirtualHost>

<VirtualHost 210.120.110.119:80>
    DocumentRoot E:/www/httpd/hao
    ServerName hao.aben.com
</VirtualHost>
如履薄冰

回复 2# 我不是鱼 的帖子

多谢超版