在straem增加一下配置
stream {
log_format TCP_proxy '$remote_addr - [$time_local] '
'$protocol $status $bytes_sent $bytes_received '
'$session_time "$upstream_addr" '
'"$upstream_bytes_sent" "$upstream_bytes_received" "$upstream_connect_time" '
'$remote_addr $remote_port $server_addr $server_port';
error_log /alidata1/logs/nginx/proxy_error.log;
access_log /alidata1/logs/nginx/proxy_access.log TCP_proxy;
server {
listen 8219;
proxy_pass 10.253.72.12:8219;
}
}
标签:log,TCP,nginx,proxy,upstream,日志,addr From: https://www.cnblogs.com/gavin11/p/17147578.html