如题所示,nginx的日志记录格式如下:
log_format access '$remote_addr - $http_x_forwarded_for - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$host" "$remote_port" '
这段时间,网站总受DDOS攻击,排查日志文件。看IP前10,如下图所示:
再随机抽了几条日志详情查看,发现如题所示的三个变量值,均为空,随机日志如下所示:
