虛擬主機 開啓httpd-vhosts.confphp
conf\extra\httpd-vhosts.conf文件html
<VirtualHost 127.0.0.1:80>web
DocumentRoot "D:/website/Apache Software Foundation/Apache2.2/htdocs"ide
DirectoryIndex index.html index.htm default.htmspa
ServerName www.localhost.comhtm
ServerAlias www.localhost.comblog
<Directory /> it
Options FollowSymLinksio
AllowOverride None class
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>
#配置虛擬目錄
<IfModule dir_module>
DirectoryIndex index.html index.php
Alias /myblog "D:/myblog"
<Directory "D:/myblog">
Order allow,deny
Allow from all
</Directory>
</IfModule>
#Alias
<IfModule dir_module>
DirectoryIndex index.html
Alias /my "D:/website_old/Apache2.2/htdocs"
<Directory "D:/website_old/Apache2.2/htdocs">
Order allow,deny
Allow from all
</Directory>
</IfModule>