我一直遇到500内部服务器错误是Web服务器错误,随后将其记录为错误。 但是,我已被告知500内部服务器错误也可能是应用程序错误。在这种情况下,发生这种情况时似乎没有登录到Web服务器。
是否有理由认为500内部服务器错误不将问题报告给Web服务器错误日志?
www.w3.org报道:
内部错误500
服务器遇到意外情况,导致无法完成请求。
答案 0 :(得分:1)
根据spec,HTTP 5xx状态代码被定义为服务器端错误。导致HTTP 5xx错误的任何客户端问题都是错误使用HTTP状态代码。阻止请求得到满足的客户端问题应该会产生HTTP 4xx状态代码。
6.6服务器错误5xx
状态代码的5xx(服务器错误)类表示服务器知道它已经出错或无法执行所请求的方法。 ...
- https://tools.ietf.org/html/rfc7231#section-6.6
6.5客户端错误4xx
状态代码的4xx(客户端错误)类表示客户端似乎有错误。 ...
答案 1 :(得分: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 Web服务器,您可以检查其日志文件/var/log/apache2/error.log
对于IIS,您可以在%SystemDrive%\inetpub\logs\LogFiles
或%SystemDrive%\Windows\System32\LogFiles\HTTPERR