http {
log_format cache '$remote_addr - $remote_user [$time_local] $request '
"$status" $body_bytes_sent "$http_referer" "$host" '
'"$http_user_agent" "$http_x_forwarded_for" "$upstream_cache_status" '
'"$upstream_addr" "$upstream_response_time" "$request_time"';
...
server {
access_log /var/log/nginx/access.log cache;
...
}
}
tail -f /var/log/nginx/access.log |grep -e '"HIT"'