#第1个站点的配置 <VirtualHost *:80> DocumentRoot "D:/phpStudy/WWW" ServerName localhost <Directory "D:/phpStudy/WWW"> Options +Indexes +FollowSymLinks +ExecCGI Order Allow,Deny Allow from all DirectoryIndex index.php index.html # 当前目录,允许“分布式”权限布置 AllowOverride all </Directory> </VirtualHost> #第2个站点的配置 <VirtualHost *:80> ServerName www.xuexi.com # 设定该站点的域名,即通过以下域名访问 ServerAlias map.xuexi.com tv.xuexi.com DocumentRoot "D:/phpStudy/WWW/xuexi/day1" <Directory "D:/phpStudy/WWW/xuexi/day1"> Options +Indexes +FollowSymLinks +ExecCGI Order Allow,Deny Allow from all DirectoryIndex index.html index.php #当前目录,允许“分布式”权限布置 AllowOverride all </Directory> #设置目录别名(虚拟目录) Alias /zst "D:/phpStudy/WWW/tp3.2.3" <Directory "D:/phpStudy/WWW/tp3.2.3"> Options +Indexes +FollowSymLinks +ExecCGI Order Allow,Deny Allow from all DirectoryIndex index.html index.php #当前目录,允许“分布式”权限布置 AllowOverride all </Directory> </VirtualHost> #第3个站点的配置 <VirtualHost *:80> DocumentRoot "D:/phpStudy/WWW/tp3.2.3" ServerName www.zstphp.com <Directory "D:/phpStudy/WWW/3.2.3"> Options +Indexes +FollowSymLinks +ExecCGI Order Allow,Deny Allow from all DirectoryIndex index.php index.html # 当前目录,允许“分布式”权限布置 AllowOverride all </Directory> </VirtualHost>