问题环境:Apache(2.4.10),php4网站目录下有.php以及.html
解决思路:
1.重启服务
2.访问其他html文件
3.仔细检查配置文件(如需修改配置文件,先备份!先备份!先备份!)
4.若修改无果,根据报错日志定位具体问题
5.若报错日志无意义,修改网站根目录,写入测试页面
6.修改前后配置文件对比如下:
[root@web etc]# diff httpd.conf httpd.con
< ????#Options Indexes FollowSymLinks
Options Indexes FollowSymLinks
< ????Options Indexes FollowSymLinks ExecCGI Includes
Options ?FollowSymLinks ExecCGI Includes< ????DirectoryIndex index.html index.html.var index.php index.php3 index.php4 index.php5
DirectoryIndex index.html index.html.var index.php index.php3 index.php4
< ????AllowOverride None
AllowOverride all
<
AddType application/x-httpd-php .html .htm .php .phtml
AddType application/x-httpd-php .html .htm .php .phtml
< #ErrorDocument 404 /missing.html
< php_flag display_errors on
ErrorDocument 404 /missing.html
php_flag display_errors off
< php_value display_errors on
< php_value error_reporting 4
ServerSignature Off
html文件可以获取数据,但返回码500
原文地址:http://blog.51cto.com/13873619/2174862