Nginx反代场景,记录客户端真实IP地址到访问日志中


http {
......
log_format proxy '$remote_addr - $remote_port - "$http_x_forwarded_for" - $request_time - $upstream_response_time - "$sent_http_S" - "$sent_http_RID" - "$remote_user" - [$time_iso8601] - "$request" - $status - $body_bytes_sent - "$http_referer" - "$http_user_agent" - "$upstream_addr" - "$scheme" - "$http_host"';
......
}
server{
......
access_log  /home/wwwlogs/access.log proxy;
}
,

发表评论

您的电子邮箱地址不会被公开。