首页 > 技术文章 > [Apache]如何查看apache服务器的error log(错误日志)

KarryWang 2013-08-16 16:04 原文

  在进行网页和服务器的测试时, 有时会提醒 500 Internal Server Error:

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, webmaster@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.

  这可能是由于我们自己的代码问题, 而引发的服务器在执行时的错误, 不过查看一下error log就很容易找到了在哪个地方出现了错误。

  Linux下如果在安装Apache服务器时是采用默认安装方式安装, 那么服务器的error log一般就存放在/var/log/apache2中, 用vim打开, 查看最下方的日志更新, 你可以再一次测试网页, 看一下错误日志有哪几行是新增的, 那就是此次出错的原因。

  

推荐阅读