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>


你可能感兴趣的:(PHP)