转自:http://blog.sina.com.cn/s/blog_a345dd4c01011wug.html
编辑httpd.conf文件,找到DirectoryIndex在后面加一个index.php。
例如,我把DirectoryIndex这行改为:DirectoryIndex index.html index.htm index.php index.html.var
保存编辑的内容,重新启动Apache就可以实现了。
DirectoryIndex index.html index.htm index.php index.php3
如果上述设置后仍无法按顺序运行首页,那么还得修改一下php相关配置文件php.conf
/etc/httpd/conf.d/php.conf文件中的
DirectoryIndex index.php
上面是甚至index.php 优先,如果把DirectoryIndex index.php去掉,则index.html,应该也可以改成DirectoryIndex index.html 或者DirectoryIndex index.html index.php
安装教程: 1.将解压包文件全部解压到根目录 2.运行 您的域名/install 3.登录后台 您的域名/dede(帐号密码全为admin) 4.系统-数据库备份/还原-还原全部数据 5.设置系统基本参数 6.清理缓存 7.生成全部 (注:以上步骤不可以省略或者更改顺序) 修改教程: index 主页文件 head 头部文件 footer 底部文件 list 列表文件 article 内容文件
以上就介绍了Apache:设置首页运行indexhtml indexphp的顺序,包括了Apache方面的内容,希望对PHP教程有兴趣的朋友有所帮助。










