把下面一个模块加入到httpd.conf中
<IfModule dir_module>
#direcotory相当于是欢迎页面
DirectoryIndex index.html index.htm index.php
#你的站点别名
Alias /mywww "D:/mywww"
<Directory d:/mywww>
#这是访问权限设置
Order allow,deny
Allow from all
</Directory>
</IfModule>
其中Alias后面的别名一定要和路径相同,例如这里就是要用mywww才会有用
还有一个很重要的东西就是把#DocumentRoot "……"添加注释掉,这样默认的环境就不会到这个目录里去找