apache虚拟主机设置默认首页方法 [ 网站地图 ]

发表于:2012-9-14 浏览:174 作者: 来源:互联网

关键字:apache,虚拟主机

描述:设置默认页面 方法1 设置全局的: 修改httpd.conf文件<IfModule dir_module> DirectoryIndex index.php index.php4 index.php3 index.cgi index.

设置默认页面 
方法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> 

站长资讯网 做中国最丰富的资讯网站 沪ICP备05004089号