html文件可以获取数据,但返回码500

Apache网站,php访问正常,返回码正常,html文件可以获取数据,但返回码500

问题环境: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

转载于:https://blog.51cto.com/13873619/2174862

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值