在httpd.conf文件中找到<IfModule dir_module>行,相关的代码如下:
打开/etc/httpd/conf.d/php.conf这个文件?如果已经在/etc/httpd/conf/httpd.conf中设置了:DirecotryIndex index.php<IfModule dir_module>
DirectoryIndex index.html</IfModule> 修改成如下
<IfModule dir_module> DirectoryIndex index.html如果还不成功的话DirectoryIndex index.php
</IfModule>
就把/etc/httpd/conf.d/php.conf文件中的DirectoryIndex index.php,这一行删除,然后重启apache即可。