在Apache中配制多个虚拟目录


 

Apache默认的虚拟目录为:Apahce\htdocs

只要把php文件拷到该目录下即可通过localhost访问。

但是如果配制多个站点呢?

先找到Apache\conf\httpd.conf配制文件

找到<Directory "D:/Apache/htdocs">节点

在其后面添加其它的虚拟目录节点:如mantis

Alias /test/ "D:/test/"

<Directory "D:/test/">

  Options Indexes FollowSymLinks MultiViews

  AllowOverride all

  Order allow,deny

  Allow from all

</Directory>

 

其中test是虚拟目录名,D:/test为物理路径名。

保存文件后重启Apache,即可通过localhost/test访问站点。

摘自:spring_0534的专栏

相关内容

    暂无相关文章