早上打开网站,发现无法正常访问页面,显示错误如下:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@ziyouku.XXX and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at www.ziyouku.com Port 80
昨天晚上访问的时候还是正常的,期间并没有做过什么调整。。。于是开始检查。
登录CPANEL,正常。
连接数据库,PhpMyAdmin正常使用。。数据库没有问题。
登录FTP正常。
测试上传静态页面test.html,正常显示,Apach没问题
测试上传test.php,使用phpinfo(); 正常。。。PHP没问题。
于是检查同服务器其他人做的网站,发现也都正常。
检查error日志,竟然没相关的错误日志。。。
那是哪里出错了。这几天放假,一直没动程序。。。又开始郁闷了。
上google查了类似问题,发现都有出现500异常的情况有好多种。但都会在error日志中有提示的。。。看来我这个空间的错误日志有问题啊。。。
网上类似的解决思路有3个:
1、web根目录权限错误。解决办法,将根目录的权限由错误的777改成755
2、php文件属性错误。解决办法,将php文件的属性改成 644
3、.htaccess文件错误 。 解决办法,修改.htaccess文件的内容,若在ftp下无法查看.htaccess文件,请用在本机制作一个空的.htaccess文件,上传覆盖之;
由于我的没有错误日志提示,根据以上3类,检查了下,最后解决方法是:
1、用空的.htaccess文件,上传覆盖。
2、重命名wp-config为wp-config.php.bak。
3、重新安装生成wp-config.php
ok,网站能正常访问了。。。
本文首发于自由库博客 http://www.ziyouku.com/archives/500-internal-server-error.html 转载请注明!





看来网站维护挺复杂的。
是的,相当复杂!!!
不过wordpress其实算是比较简单的了,用其他CMS才难受
安装了一个新的主题,但是修改页面或者访问后台出现500报错,这个情况不知道大家遇见过没有
有时候是留言的时候出现这个问题。