1. 程式人生 > >html文件可以獲取數據,但返回碼500

html文件可以獲取數據,但返回碼500

val web nature 對比 mis tin lock ecc 網站目錄

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