欢迎访问linux宝典,请记住本站唯一域名:www.linuxbaodian.com

Nginx内置变量

来源:原创    更新时间:2018-09-28 10:08:49    编辑:管理员    浏览:3454

Nginx内置变量不定时更新。

名称版本说明(变量列表来源于文件 ngx_http_variables   )
$args1.0.8请求中的参数;
$binary_remote_addr1.0.8远程地址的二进制表示
$body_bytes_sent1.0.8已发送的消息体字节数
$content_length1.0.8HTTP请求信息里的"Content-Length";
$content_type1.0.8请求信息里的"Content-Type";
$document_root1.0.8针对当前请求的根路径设置值;
$document_uri1.0.8与$uri相同;
$host1.0.8请求信息中的"Host",如果请求中没有Host行,则等于设置的服务器名;
$hostname1.0.8
$http_cookie1.0.8cookie 信息
$http_post1.0.8
$http_referer1.0.8引用地址
$http_user_agent1.0.8客户端代理信息
$http_via1.0.8最后一个访问服务器的Ip地址。http://www.xx.com/911.html
$http_x_forwarded_for1.0.8相当于网络访问路径。http://www.xx.com/809.html
$is_args1.0.8
$limit_rate1.0.8对连接速率的限制;
$nginx_version1.0.8
$pid1.0.8
$query_string1.0.8与$args相同;
$realpath_root1.0.8
$remote_addr1.0.8客户端地址;
$remote_port1.0.8客户端端口号;
$remote_user1.0.8客户端用户名,认证用;
$request1.0.8用户请求
$request_body1.0.8
$request_body_file1.0.8发往后端的本地文件名称
$request_completion1.0.8
$request_filename1.0.8当前请求的文件路径名
$request_method1.0.8请求的方法,比如"GET"、"POST"等;
$request_uri1.0.8请求的URI,带参数;
$scheme1.0.8所用的协议,比如http或者是https,比如rewrite^(.+)$$scheme://example.com$1redirect;
$sent_http_cache_control1.0.8
$sent_http_connection1.0.8
$sent_http_content_length1.0.8
$sent_http_content_type1.0.8
$sent_http_keep_alive1.0.8
$sent_http_last_modified1.0.8
$sent_http_location1.0.8
$sent_http_transfer_encoding1.0.8
$server_addr1.0.8服务器地址,如果没有用listen指明服务器地址,使用这个变量将发起一次系统调用以取得地址(造成资源浪费);
$server_name1.0.8请求到达的服务器名;
$server_port1.0.8请求到达的服务器端口号;
$server_protocol1.0.8请求的协议版本,"HTTP/1.0"或"HTTP/1.1";
$uri1.0.8请求的URI,可能和最初的值有不同,比如经过重定向之类的。



评论区

表情

共0条评论
  • 这篇文章还没有收到评论,赶紧来抢沙发吧~

相关内容

点击排行

随机新闻

评论排行榜