本文介绍Nginx访问日志的字段详情。
字段 | 说明 |
---|---|
__topic__ | 日志主题,固定为nginx_access_log。 |
body_bytes_sent | 发送给客户端的字节数,不包括响应头的大小。 |
host | 请求地址,IP地址或域名。 |
http_referer | URL跳转来源。 |
http_user_agent | 客户端浏览器等信息。 |
http_x_forwarded_for | 经过HTTP代理后的客户端IP地址。 |
remote_addr | 客户端IP地址。 |
remote_user | 客户端用户名。 |
request_length | 请求的长度,包括请求行、请求头和请求正文。 |
request_method | 请求方法。 |
request_time | 整个请求的总时间,单位为秒。 |
request_uri | 请求的URI。 |
status | 请求状态。 |
time_local | 服务器时间。 |
upstream_response_time | 从负载均衡向后端建立连接开始到接受完数据然后关闭连接为止的时间,单位:秒。 |