log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"';
=
[root@uat-nginx-jenkins ~]# tail /var/log/nginx/admin.access.log 47.102.25.47 - - [17/Jul/2021:23:20:01 +0800] "POST /system/remote/site/public/community/syncSite?indexTime=1626534900020 HTTP/1.1" 200 5 "-" "Apache-HttpClient/4.5.12 (Java/1.8.0_192)" 47.102.25.47 - - [17/Jul/2021:23:20:01 +0800] "POST /system/remote/group/public/community/syncUserGroup?indexTime=1626534900020 HTTP/1.1" 200 5 "-" "Apache-HttpClient/4.5.12 (Java/1.8.0_192)" 47.102.25.49 - - [17/Jul/2021:23:20:01 +0800] "POST /system/remote/publicPlatformConfig/public/community/syncPlatformConfig?indexTime=1626534900020 HTTP/1.1" 404 158 "-" "Apache-HttpClient/4.5.12 (Java/1.8.0_192)" ...
=
# 示例: 47.102.25.47 47.102.25.49
=
# 示例: - - # 为什么是两个横线 因为第一个横线是格式中定义的普通字符 # 对应关系: '$remote_addr - $remote_user [$time_local] ... 47.102.25.47 - - [17/Jul/2021:23:20:01 +0800] ...
=
# 示例: [17/Jul/2021:23:20:01 +0800]
=
包括本次http
请求的方法、url
和http
协议版本
# 示例: "POST /system/remote/site/public/community/syncSite?indexTime=1626534900020 HTTP/1.1"
=
# 示例: 200 404 502
=
不包含响应头的大小
# 示例: 5 236 345634
=
直接访问无显示,超链接跳转则有
# 示例: 多为 "-" ,表示直接发起的访问
=
# 示例: "Apache-HttpClient/4.5.12 (Java/1.8.0_192)"
=
=
wan