nginx常量参数(十)

$ancient_browser		如果浏览器被识别为旧式浏览器,该值等于 ancient_browser_value 的值
$arg_{name}           	请求中某个参数值 
$args               	请求url里的参数
$binary_remote_addr (ngx_http_core_module,ngx_stream_core_module)  二进制; 4个字节的IPV4或16个字节的IPV6
$body_bytes_sent        响应客户端的字节数,不包括响应头部
$bytes_received          从客户端收到的字节数
$bytes_sent (ngx_http_core_module, ngx_http_log_module,ngx_stream_core_module)  响应客户端的字节数
$connection (ngx_http_core_module,ngx_http_log_module,ngx_stream_core_module)  连接的序列号
$connection_requests (ngx_http_core_module, ngx_http_log_module) 连接当前的请求数量
$connections_active     当前连接数包括等待连接数
$connections_reading    正在读取请求数据的连接数
$connections_waiting    等待请求的空闲连接数
$connections_writing    正在响应数据的连接数
$content_length         请求头字段;请求内容大小
$content_type           请求头字段;请求内容类型
$cookie_                读取cookie_name的值
$date_gmt               当前的gmt时间
$date_local             当前时间local time zone
$document_root          当前请求root or alias 指令指向的值
$document_uri, $uri     当前请求的uri          
$gzip_ratio             压缩比
$host                   请求头里的host字段
$hostname (ngx_http_core_module,ngx_stream_core_module) 
$http2 
$http_                  请求头字段, 解析请求值
$https                  on https模式下运行,否则空字符串即可
$invalid_referer        nginx会通过查看referer字段和valid_referers后面的referer列表进行匹配,如果匹配到了就invalid_referer字段值为0 否则设置该值为1
$is_args                是否有参数
$limit_conn_status (ngx_http_limit_conn_module, ngx_stream_limit_conn_module)  连接超过策略
$limit_rate             限制同一IP流量
$limit_req_status       限制同一个IP某段时间的访问量
$memcached_key          从memcached_pass里读取一个存在的key
$modern_browser         如果浏览器被识别为新式浏览器,该值等于 modern_browser_value 的值
$msie                   ==1 就是任何IE的版本
$nginx_version (ngx_http_core_module,ngx_stream_core_module)  nginx版本
$pid (ngx_http_core_module,ngx_stream_core_module)    worker_process的进程号(PID)
$protocol               tcp | udp 
$proxy_add_x_forwarded_for 是用来识别通过HTTP代理或负载均衡方式连接到Web服务器的客户端最原始的IP地址的HTTP请求头字段
$proxy_host             代理服务 proxy_pass 的name:port
$proxy_port             代理服务 proxy_pass 的port
$proxy_protocol_addr (ngx_http_core_module,ngx_stream_core_module,ngx_http_core_module,ngx_stream_core_module)   代理协议头里的客户端地址
$proxy_protocol_server_addr (ngx_http_core_module,ngx_stream_core_module,ngx_http_core_module,ngx_stream_core_module) 代理协议头里的服务端地址
$query_string 与$args 一样都是请求的参数
$realip_remote_addr (ngx_http_realip_module,ngx_stream_realip_module,ngx_http_realip_module,ngx_stream_realip_module) 原始的客户端IP
$realpath_root        root,alias 绝对路径
$remote_addr (ngx_http_core_module,ngx_stream_core_module,ngx_http_core_module,ngx_stream_core_module) 客户端地址
$remote_user                                    Basic authentication的用户名
$request                                        完整的原始请求
$request_body                                   请求体 
$request_body_file                              请求体你的临时文件
$request_completion                             完成状态: "OK"; 未完成 ""
$request_filename                              请求的资源路径
$request_id                                     请求的唯一标识
$request_length (ngx_http_core_module,ngx_http_log_module)           请求的长度(包括请求行,请求头,请求体)
$request_method                                 请求方式 GET POST
$request_time (ngx_http_core_module,ngx_http_log_module)           请求事件 ms
$request_uri                                    请求的原始uri带参数的
$scheme                                         http or https             
            
$secure_link                                    连接状态 实现下载防盗链
$secure_link_expires                            连接过期时间

$sent_http_                                     读取。响应任意头字段,全小写,用下划线代替短横线
$sent_trailer_                                  读取。响应结束时发送的任意字段,全小写,用下划线代替短横线
$server_addr (ngx_http_core_module,ngx_stream_core_module)             处理请求的服务地址
$server_name                                    处理请求的服务名
$server_port (ngx_http_core_module,ngx_stream_core_module)             处理请求的服务端口
$server_protocol                                请求的协议      http/1.0 http/1.1 http/2.0

$session_log_binary_id                          sessionId (16bytes)
$session_log_id                                 sessionId
$session_time                                   session时长,ms
$slice_range                                    大文件切片范围
$status (ngx_http_core_module,ngx_http_log_module,ngx_stream_core_module)                  响应状态
原文地址:https://www.cnblogs.com/pengsn/p/13377534.html