主页 > 原创 > apache Internal Server Error 解决方法

apache Internal Server Error 解决方法

今天打开ourbits q2a 功能时提示Internal Server Error错误.错误如下:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost 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.
查看/var/log/apache2/error.log文件得知出现如下错误

[Wed Oct 12 07:08:51 2011] [alert]
[client 61.150.*.*] /var/www/q2a/.htaccess:
Invalid command 'RewriteEngine',
perhaps misspelled or defined by a module not included in the server
得知q2a目录下隐藏文件.htaccess文件出现rewrite错误。该错误是由于调用mod_rewrite.so库失败引起的,在httpd.conf文件中添加如下代码并重启apache2服务即可恢复。
  • 进入apache2配置文件目录
cd /etc/apache2
  • 编辑httpd.conf文件
vi httpd.conf
  • 添加以下代码并保存文件
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
  • 重启apache2服务即可
service apache2 restart

发表评论

邮箱地址不会被公开。 必填项已用*标注