在apache的安装目录下Apache2\htdocs\httpd.conf, 修改下面两个参数:
#
# 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 "指定路径"
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "指定路径">
两个指定路径要一样,然后重启apache。