#第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>

  

相关文章:

  • 2021-07-09
  • 2021-06-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-07
猜你喜欢
  • 2021-11-17
  • 2021-09-23
  • 2021-07-04
  • 2021-07-14
相关资源
相似解决方案