nginx global variables tidy up the summary
- 2020-05-06 12:17:42
- OfStack
$args this variable is equivalent to the argument
in the request line
$content_length is equal to the value of "Content_Length" in the request line.
$content_type is equivalent to the value
of "Content_Type" in the request header
$document_root is equivalent to the value
specified in the root directive currently requested
$document_uri is the same as $uri
$host is the same as the value specified in the "Host" line in the request header or the name of the server that request arrived at (without the Host line)
$limit_rate allows limited connection rate
$request_method is equivalent to method of request, usually "GET" or "POST"
$remote_addr client ip
$remote_port client port
$remote_user is equivalent to the username,
is authenticated by ngx_http_auth_basic_module
$request_filename the path name of the currently requested file,
, is a combination of root or alias and URI request
$request_body_file
$request_uri contains the full initial URI
parameter
$query_string is the same as $args,
$server_protocol is equivalent to the request protocol, using "HTTP/1.0" or "HTTP/1.1"
$server_addr request arrives at server ip. The value of this variable is generally obtained for the purpose of making a system call. To avoid system calls, it is necessary to specify ip in the listen directive and to use the bind parameter.
$server_name request arrives with the server name
$server_port requests the port number
of the arriving server
$uri is the same as URI in the current request, and not the same as the original value, such as when redirecting internally or using index
in the request line
$content_length is equal to the value of "Content_Length" in the request line.
$content_type is equivalent to the value
of "Content_Type" in the request header
$document_root is equivalent to the value
specified in the root directive currently requested
$document_uri is the same as $uri
$host is the same as the value specified in the "Host" line in the request header or the name of the server that request arrived at (without the Host line)
$limit_rate allows limited connection rate
$request_method is equivalent to method of request, usually "GET" or "POST"
$remote_addr client ip
$remote_port client port
$remote_user is equivalent to the username,
is authenticated by ngx_http_auth_basic_module
$request_filename the path name of the currently requested file,
, is a combination of root or alias and URI request
$request_body_file
$request_uri contains the full initial URI
parameter
$query_string is the same as $args,
$server_protocol is equivalent to the request protocol, using "HTTP/1.0" or "HTTP/1.1"
$server_addr request arrives at server ip. The value of this variable is generally obtained for the purpose of making a system call. To avoid system calls, it is necessary to specify ip in the listen directive and to use the bind parameter.
$server_name request arrives with the server name
$server_port requests the port number
of the arriving server
$uri is the same as URI in the current request, and not the same as the original value, such as when redirecting internally or using index