分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 教程案例

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

发布时间:2023-09-06 02:14责任编辑:顾先生关键词:暂无标签
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

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

原文地址:http://blog.51cto.com/13873619/2174862

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved