nginx uri和request_uri区别
Embedded Variables
The ngx_http_core_module module supports embedded variables with names matching the Apache Server variables. First of all, these are variables representing client request header fields, such as $http_user_agent, $http_cookie, and so on. Also there are other variables:
$arg_name- argument
namein the request line $args- arguments in the request line
$binary_remote_addr- client address in a binary form, value’s length is always 4 bytes for IPv4 addresses or 16 bytes for IPv6 addresses
$body_bytes_sent- number of bytes sent to a client, not counting the response header; this variable is compatible with the “
%B” parameter of themod_log_configApache module $bytes_sent- number of bytes sent to a client (1.3.8, 1.2.5)
$connection- connection serial number (1.3.8, 1.2.5)
$connection_requests- current number of requests made through a connection (1.3.8, 1.2.5)
$content_length- “Content-Length” request header field
$content_type- “Content-Type” request header field
$cookie_name- the
namecookie $document_root- root or alias directive’s value for the current request
$document_uri- same as
$uri $host- in this order of precedence: host name from the request line, or host name from the “Host” request header field, or the server name matching a request
$hostname- host name
$http_name- arbitrary request header field; the last part of a variable name is the field name converted to lower case with dashes replaced by underscores
$https- “
on” if connection operates in SSL mode, or an empty string otherwise $is_args- “
?” if a request line has arguments, or an empty string otherwise $limit_rate- setting this variable enables response rate limiting; see limit_rate
$msec- current time in seconds with the milliseconds resolution (1.3.9, 1.2.6)
$nginx_version- nginx version
$pid- PID of the worker process
$pipe- “
p” if request was pipelined, “.” otherwise (1.3.12, 1.2.7) $proxy_protocol_addr- client address from the PROXY protocol header, or an empty string otherwise (1.5.12)
The PROXY protocol must be previously enabled by setting the
proxy_protocolparameter in the listen directive. $proxy_protocol_port- client port from the PROXY protocol header, or an empty string otherwise (1.11.0)
The PROXY protocol must be previously enabled by setting the
proxy_protocolparameter in the listen directive. $query_string- same as
$args $realpath_root- an absolute pathname corresponding to the root or alias directive’s value for the current request, with all symbolic links resolved to real paths
$remote_addr- client address
$remote_port- client port
$remote_user- user name supplied with the Basic authentication
$request- full original request line
$request_body- request body
The variable’s value is made available in locations processed by the proxy_pass, fastcgi_pass,uwsgi_pass, and scgi_pass directives when the request body was read to a memory buffer.
$request_body_file- name of a temporary file with the request body
At the end of processing, the file needs to be removed. To always write the request body to a file,client_body_in_file_only needs to be enabled. When the name of a temporary file is passed in a proxied request or in a request to a FastCGI/uwsgi/SCGI server, passing the request body should be disabled by the proxy_pass_request_body off, fastcgi_pass_request_body off,uwsgi_pass_request_body off, or scgi_pass_request_body off directives, respectively.
$request_completion- “
OK” if a request has completed, or an empty string otherwise $request_filename- file path for the current request, based on the root or alias directives, and the request URI
$request_id- unique request identifier generated from 16 random bytes, in hexadecimal (1.11.0)
$request_length- request length (including request line, header, and request body) (1.3.12, 1.2.7)
$request_method- request method, usually “
GET” or “POST” $request_time- request processing time in seconds with a milliseconds resolution (1.3.9, 1.2.6); time elapsed since the first bytes were read from the client
$request_uri- full original request URI (with arguments)
$scheme- request scheme, “
http” or “https” $sent_http_name- arbitrary response header field; the last part of a variable name is the field name converted to lower case with dashes replaced by underscores
$sent_trailer_name- arbitrary field sent at the end of the response (1.13.2); the last part of a variable name is the field name converted to lower case with dashes replaced by underscores
$server_addr- an address of the server which accepted a request
Computing a value of this variable usually requires one system call. To avoid a system call, the listendirectives must specify addresses and use the
bindparameter. $server_name- name of the server which accepted a request
$server_port- port of the server which accepted a request
$server_protocol- request protocol, usually “
HTTP/1.0”, “HTTP/1.1”, or “HTTP/2.0” $status- response status (1.3.2, 1.2.2)
$tcpinfo_rtt,$tcpinfo_rttvar,$tcpinfo_snd_cwnd,$tcpinfo_rcv_space- information about the client TCP connection; available on systems that support the
TCP_INFOsocket option $time_iso8601- local time in the ISO 8601 standard format (1.3.12, 1.2.7)
$time_local- local time in the Common Log Format (1.3.12, 1.2.7)
$uri- current URI in request, normalized
The value of
$urimay change during request processing, e.g. when doing internal redirects, or when using index files.
nginx uri和request_uri区别的更多相关文章
- nginx 的uri、request_uri 区别
在nginx中有几个关于uri的变量,包括$uri $request_uri $document_uri,下面看一下他们的区别 : $request_uri: /stat.php?id=1585378 ...
- nginx中,$request_uri和$uri的区别
nginx中,$request_uri和$uri的区别 $request_uri This variable is equal to the *original* request URI as r ...
- 详解 $_SERVER 函数中QUERY_STRING和REQUEST_URI区别
详解 $_SERVER 函数中QUERY_STRING和REQUEST_URI区别 http://blog.sina.com.cn/s/blog_686999de0100jgda.html 实例: ...
- apache与nginx日志文件的区别(转载)
apache与nginx日志文件的区别 转载:http://www.xfcodes.com/apache/log/3270.htm 导读:apache与nginx日志文件的区别,在apache与ngi ...
- 简析 Tomcat 、Nginx 与 Apache 的区别
简析 Tomcat .Nginx 与 Apache 的区别 本文讲的是简析 Tomcat .Nginx 与Apache的区别, 经常在用 apache 和 tomcat 等这些服务器,可是总感觉还是不 ...
- nginx和uwsgi的区别和作用
Django+uwsgi+nginx nginx和uwsgi的区别和作用: 1, nginx是对外的服务器,外部浏览器通过url访问nginx, uwsgi是对内的服务器,主要用来处理动态请求. 2, ...
- nginx 和uwsgi的区别与作用
在介绍nginx和uwsgi的区别和作用之前我们先介绍一下几个概念 1.WSGI WSGI的全称是Web Server Gateway Interface(Web服务器网关接口),它不是服务器.pyt ...
- nginx参数 uri和request_uri讨论
uri可以输出rewrite后的uri不带参数,要用args查看 request_uri 是请求的完整的uri带参数
- 详细解析 nginx uri 如何匹配 location 规则
location 是 nginx 配置中出现最频繁的配置项,一个 uri 是如何与多个 location 进行匹配的? 在有多个 location 都匹配的情况下,如何决定使用哪一个 location ...
随机推荐
- hiho一下第128周 后缀自动机二·重复旋律5
#1445 : 后缀自动机二·重复旋律5 时间限制:10000ms 单点时限:2000ms 内存限制:512MB 描述 小Hi平时的一大兴趣爱好就是演奏钢琴.我们知道一个音乐旋律被表示为一段数构成的数 ...
- Lowest Common Ancestor of a Binary Search Tree -- LeetCode
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BS ...
- skywalking学习
skywalking简介 SkyWalking一个开源可观测性平台,用于收集.分析.聚合和可视化来自服务和云原生基础设施的数据.SkyWalking提供了一种简单的方法,可以让你清晰的查看分布式系统. ...
- Debian下载地址
http://cdimage.debian.org/cdimage/archive/
- tshop-pbsm-shop-nav-ch结构和样式分析
html结构 <div id="content" class="eshop head-expand tb-shop"> <div id=&qu ...
- [置顶]
kubernetes创建资源yaml文件例子--rc
apiVersion: v1 #指定api版本,此值必须在kubectl apiversion中 kind: ReplicationController #指定创建资源的角色/类型 metadata: ...
- sqlserver中常用的四个选项(NOCOUNT/ANSI_NULLS/QUOTED_IDENTIFIER/ XACT_ABORT)
1 NOCOUNT选项 当 SET NOCOUNT 为 ON 时,不返回计数.当 SET NOCOUNT 为 OFF 时,返回计数. eg: if object_id(N'table_test',N' ...
- QQ-weiyun(微云)-云储存
ylbtech-DatabaseDesgin:QQ-weiyun(微云)-云储存 1.A,数据库关系图(Database Diagram) -- =========================== ...
- python移植性提示
移植性提示 2.1 预计在python3.0中,运算符/只能执行True除法.3.0发布后,程序员要更新自己的程序,以兼容新行为. 3.1 python2.0版本开始引入增量赋值符号,在老版本pyth ...
- 【OpenGL4.0】GLSL渲染语言入门与VBO、VAO使用:绘制一个三角形 【转】
http://blog.csdn.net/xiajun07061225/article/details/7628146 以前都是用Cg的,现在改用GLSL,又要重新学,不过两种语言很多都是相通的. 下 ...