读书人

apche conf 更动首页

发布时间: 2012-06-30 17:20:12 作者: rapoo

apche conf 更改首页
\Apache\conf\httpd.conf

#默认虚拟主机
NameVirtualHost *:80
<VirtualHost *:80>
ServerName *
DocumentRoot "D:/php/apmserv/APMServ5.2.6/www/htdocs"
<Directory "D:/php/apmserv/APMServ5.2.6/www/htdocs">
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml
AllowOverride None
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>

DirectoryIndex:index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml

该参数是按照顺序排列的。首先访问index.html.若没有访问index.htm 所以我们一般只使用一个。即:
#默认虚拟主机
NameVirtualHost *:80
<VirtualHost *:80>
ServerName *
DocumentRoot "D:/php/apmserv/APMServ5.2.6/www/htdocs"
<Directory "D:/php/apmserv/APMServ5.2.6/www/htdocs">
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.php
AllowOverride None
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>


读书人网 >Web前端

热点推荐