apache - 在 apache 访问日志中只写入破折号

标签 apache logging

一个普通的日志是这样的:

111.111.111.111 222.222.222.222 - - [06/Jun/2017:02:19:00 +0900] "GET /monitor/l7check.nhn HTTP/1.1" 200 4 1222 "-" "-"


但是一些日志看起来像这样:

111.111.111.111 333.333.333.333 - - [06/Jun/2017:02:18:58 +0900] "-" 408 - 13 "-" "-"


我看不懂这个日志的意思。
为什么它只有一个“破折号”而不是“获取网址”?
是否可以在不请求 URL 的情况下登录 URL?

最佳答案

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

6.5.7. 408 Request Timeout

The 408 (Request Timeout) status code indicates that the server did not receive a complete request message within the time that it was prepared to wait. A server SHOULD send the "close" connection option (Section 6.1 of [RFC7230]) in the response, since 408 implies that the server has decided to close the connection rather than continue waiting. If the client has an outstanding request in transit, the client MAY repeat that request on a new connection.

所以,客户端连接上了,但是没有发送任何 HTTP 请求。服务器等待,并最终关闭了连接。

关于apache - 在 apache 访问日志中只写入破折号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44403769/

相关文章:

python - Sentry django 配置 - 记录器

java - 尝试使用 SMTP Appender 时出现 Log4J2 Factory 错误

batch-file - 使用 .bat 附加文本

azure - 将 Serilog 中的 outputTemplate 参数与 Azure Application Insights 结合使用

javascript - Symfony JavaScript Assets 问题(双项目名称)

apache如何动态使用 "Header set Set-Cookie expires=<date>"

windows - Apache 2 - LDAP/Active Directory - 自动登录/身份验证过程

java - Jersey 服务器日志记录/w Logback

PHP 不工作,Mac OS X El Capitan

php - Apache:如何将 Ruby 项目作为 PHP 项目的子目录提供服务?