1

我一直将 500 Internal Server Error 视为 Web 服务器错误,随后将其记录为错误。但是,我被告知 500 Internal Server Error 也可能是应用程序错误。在这种情况下,发生这种情况时,它似乎不会登录到 Web 服务器。

是否有理由认为 500 Internal Server Error不会将问题报告给 Web 服务器错误日志?

www.w3.org 报道:

内部错误 500

服务器遇到了一个意外情况,导致它无法完成请求。

4

2 回答 2

1

根据规范,HTTP 5xx 状态码被定义为服务器端错误。任何导致 HTTP 5xx 错误的客户端问题都是 HTTP 状态代码的错误使用。阻止请求被满足的客户端问题应该导致 HTTP 4xx 状态代码。

6.6 服务器错误 5xx

5xx(服务器错误)类状态码表示服务器知道它出错或无法执行请求的方法。...

-- https://www.rfc-editor.org/rfc/rfc7231#section-6.6

6.5 客户端错误 4xx

4xx(客户端错误)类状态码表明客户端似乎出错了。...

-- https://www.rfc-editor.org/rfc/rfc7231#section-6.5

于 2016-08-25T15:55:52.477 回答
0

如果您在运行 Microsoft IIS 的网站上看到 500 错误,您可能会收到更具体的错误消息:

500.0   Module or ISAPI error occurred.
500.11  Application is shutting down on the web server.
500.12  Application is busy restarting on the web server.
500.13  Web server is too busy.
500.15  Direct requests for Global.asax are not allowed.
500.19  Configuration data is invalid.
500.21  Module not recognized.
500.22  An ASP.NET httpModules configuration does not apply in Managed Pipeline mode.
500.23  An ASP.NET httpHandlers configuration does not apply in Managed Pipeline mode.
500.24  An ASP.NET impersonation configuration does not apply in Managed Pipeline mode.
500.50  A rewrite error occurred during RQ_BEGIN_REQUEST notification handling. A configuration or inbound rule execution error occurred.
500.51  A rewrite error occurred during GL_PRE_BEGIN_REQUEST notification handling. A global configuration or global rule execution error occurred.
500.52  A rewrite error occurred during RQ_SEND_RESPONSE notification handling. An outbound rule execution occurred.
500.53  A rewrite error occurred during RQ_RELEASE_REQUEST_STATE notification handling. An outbound rule execution error occurred. The rule is configured to be executed before the output user cache gets updated.
500.100 Internal ASP error.

对于 Apache 网络服务器,您可以检查其日志文件/var/log/apache2/error.log

对于 IIS,您可以在%SystemDrive%\inetpub\logs\LogFiles%SystemDrive%\Windows\System32\LogFiles\HTTPERR

于 2016-08-25T16:11:31.293 回答