重启apache,就OK啦。当然你要修改你的hosts文件。
方法2、修改\PhpServer\Apache2.2\conf\extra\httpd-vhosts.conf
直接将上面一段copy到httpd-vhosts.conf的最后即可。
实际上看名字就知道httpd-vhosts.conf是一个虚拟站点配置集中地,方便管理。
也就是如下: #
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
#
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any block.
#
ServerName bbs.xxx.com #域名
DocumentRoot "F:/website/bbs" #该域名对应的目录地址
#该节点是配置权限、默认首页啊等等东东。
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.php
AllowOverride None
Order Deny,Allow
Allow from all