ngx_http_variable_sent_keep_alive, 0, 0, 0 },
{ ngx_string("sent_http_transfer_encoding"), NULL,
ngx_http_variable_sent_transfer_encoding, 0, 0, 0 },
{ ngx_string("sent_http_cache_control"), NULL, ngx_http_variable_headers,
offsetof(ngx_http_request_t, headers_out.cache_control), 0, 0 },
{ ngx_string("limit_rate"), ngx_http_variable_request_set_size,
ngx_http_variable_request_get_size,
offsetof(ngx_http_request_t, limit_rate),
NGX_HTTP_VAR_CHANGEABLE|NGX_HTTP_VAR_NOCACHEABLE, 0 },
{ ngx_string("nginx_version"), NULL, ngx_http_variable_nginx_version,
0, 0, 0 },
{ ngx_string("hostname"), NULL, ngx_http_variable_hostname,
0, 0, 0 },
{ ngx_string("pid"), NULL, ngx_http_variable_pid,
0, 0, 0 },
{ ngx_null_string, NULL, NULL, 0, 0, 0 }
};
把這些變量提取下,總結如下:
arg_PARAMETER#這個變量包含GET請求中,如果有變量PARAMETER時的值 。
args#這個變量等于請求行中(GET請求)的參數(shù),例如foo=123&bar=blahblah;
binary_remote_addr #二進制的客戶地址 。
body_bytes_sent#響應時送出的body字節(jié)數(shù)數(shù)量 。即使連接中斷,這個數(shù)據(jù)也是精確的 。
content_length#請求頭中的Content-length字段 。
content_type#請求頭中的Content-Type字段 。
cookie_COOKIE#cookie COOKIE變量的值
document_root#當前請求在root指令中指定的值 。
document_uri#與
uri相同 。
host#請求主機頭字段,否則為服務器名稱 。
hostname#Set to the machine’s hostname as returned by gethostname
http_HEADER
is_args#如果有
args參數(shù),這個變量等于”?”,否則等于”",空值 。
http_user_agent#客戶端agent信息
http_cookie#客戶端cookie信息
limit_rate#這個變量可以限制連接速率 。
query_string#與
args相同 。
request_body_file#客戶端請求主體信息的臨時文件名 。
request_method#客戶端請求的動作,通常為GET或POST 。
remote_addr#客戶端的IP地址 。
remote_port#客戶端的端口 。
remote_user#已經(jīng)經(jīng)過Auth Basic Module驗證的用戶名 。
request_completion #如果請求結束,設置為OK. 當請求未結束或如果該請求不是請求鏈串的最后一個時,為空(Empty) 。
request_method#GET或POST
request_filename#當前請求的文件路徑,由root或alias指令與URI請求生成 。
request_uri#包含請求參數(shù)的原始URI,不包含主機名,如:”/foo/bar.php?arg=baz” 。不能修改 。
scheme#HTTP方法(如http,https) 。
server_protocol#請求使用的協(xié)議,通常是HTTP/1.0或HTTP/1.1 。
server_addr#服務器地址,在完成一次系統(tǒng)調用后可以確定這個值 。
server_name#服務器名稱 。
server_port#請求到達服務器的端口號 。
推薦閱讀
- Nginx如何配置url_hash轉發(fā)方式
- nginx提示No Nginx提示無法連接路由
- linux查看nginx安裝路徑 Nginx安裝路徑
- 配置Nginx子域名泛解析綁定至單獨目錄 nginx域名綁定二級目錄
- Nginx安裝配置PageSpeed模塊實現(xiàn)網(wǎng)站加速
- Nginx的error_log和Access_log分析 nginx access log
- Nginx配置error_page nginx配置errorlog
- 解決nginx一直跳轉登錄頁面 解決Nginx:
- 解決nginx+php-fpm無法上傳文件問題
- nginx reload指定配置文件 nginx安裝文件上傳ngx_upload模塊教程
