当前位置: 主页 > 服务器技术 > Web服务器 > apache虚拟主机设置默认首页方法

apache虚拟主机设置默认首页方法

时间:2012-9-14来源:互联网 点击:
设置默认页面 
方法1 设置全局的: 
修改httpd.conf文件
<IfModule dir_module> 
DirectoryIndex index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.shtml index.phtml default.php 
</IfModule> 

方法2 针对某一目录或某一个虚拟主机可以这么设置: 
增加:DirectoryIndex default.php

Alias /aidd2008 "D:/php/web/aidd2008" 
<Directory "D:/php/web/aidd2008"> 
Options Indexes MultiViews 
AllowOverride None 
order allow,deny 
Allow from all 
DirectoryIndex default.php 
</Directory> 
站长资讯网
. TAG: apache 虚拟主机
推荐内容最近更新人气排行
关于我们 | 友情链接 | 网址推荐 | 常用资讯 | 网站地图 | RSS | 留言