Apache服务器错误问题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, admin@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.

如果您上传的PHP程序在运行后报“Internal Server Error”错误,请您注意检查以下两方面:

  • 请您检查PHP程序的属性是否设置为755,如果PHP程序的属性不是755,那么运行的时候会报“Internal Server Error”错误,请您使用FTP软件将属性更改为755再测试。
  • 请您检查PHP程序所在的当前目录下是否有名为.htaccess的文件存在,此文件会干扰PHP程序的正常运行,如果发现有此文件建议您删除或者改名后再测试。

解决1:

  1. 打开httpd.conf
  2. 找到mod_rewrite.so 行,将前面的注释打开(即删掉前面的'#'符号)。
  3. 关闭httpd.conf,重启apache服务器即可。

解决2:

  1. httpd.conf 中找到你网站目录对应的Directory 行。
  2. 将其中的 RewriteEngine 项设置为 'ALL'。
原文地址:https://www.cnblogs.com/chenjiacheng/p/6522302.html