Variables provided by the Ngx_http_core_module module

Source: Internet
Author: User
Tags server port

Ngx_http_core_module module when processing requests, there will be a large number of variables, these variables can be recorded through the access log, can also be used for other nginx modules. Some variables are used when we make policies for requests such as rewriting and so on, and the variables provided by the Ngx_http_core_module module are summarized below, as follows:

parameter name Comment $arg_parameter The value of a parameter in an HTTP request, such as/index.php?site=www.ttlsa.com, you can use $arg_site to get the www.ttlsa.com value. $args full parameters in the HTTP request. For example, in a request/index.php?width= -&height= $, the $args represents the string width= -&height= $. $binary the client address in binary format _remote_addr. For example, \x0a\xe0b\x0e$body_bytes_sent indicates that in the HTTP response sent to the client, the number of bytes in the package body portion $content_length represents the content in the client request header-the Length field $content_type represents the content in the client request header-The Type field $cookie_cookie represents the cookie field in the client request header $document_root represents the value of the root configuration entry used by the current request $uri represents the URI of the current request without any parameters $document_ The URI is the same as $uri meaning $request_uri represents the original request URI sent by the client with the full parameters. $uri and $document_uri may not necessarily be the user's original request, after an internal redirect it might be a redirected URI, and $request_uri will never change, always the client's original URI. $host represents the host field in the client request header. If the host field does not exist, the actual processed server (virtual host) name is replaced. If the host field has a port, such as Ip:port, then $host is stripped of the port and its value is IP. The $host are all lowercase. Unlike http_host in Http_header, these features http_host only the value of the host header. $hostnamerepresents the name of the machine on which Nginx is located, the same value returned by the gethostbyname call $http _header represents the value of the corresponding header in the current HTTP request. Header name is all lowercase. For example, the value corresponding to the host header in the request is used $http the _host table $sent _http_header represents the value of the corresponding header in the HTTP response of the returned client. Header name is all lowercase. For example, use $sent _ Http_content_type to indicate content in the response-the value of the type header $is _args indicates whether the URI in the request is with a parameter, $is _args value is?, if no arguments, is an empty string $limit _rate indicates the current speed limit of the connection, 0 means an infinite speed $nginx _version represents the current Nginx version number $query _string request URI parameters, the same as the $args, but the $ Query_string is read-only and does not change $remote _addr represents the address of the client $remote _port represents the port used by the client connection $remote _user represents the user name defined when using Auth Basic module $request _filename indicates that the URI in the user request passes through the root or alias converted file path $request _body represents the package body in the HTTP request, which is only meaningful in Proxy_pass or Fastcgi_pass $request _ Body_file represents the temporary file name of the package body store in the HTTP request $request _completion when the request has been fully completed, its value is "OK". If it is not completed, it is returned to the client, whose value is an empty string, or if the last block of the file is accessed using HTTP range in the case of a continuation of the breakpoint, the value is also an empty string. $request _method represents the method name for an HTTP request, such as GET, PUT, post, and so on $scheme represents an HTTP scheme, such as when HTTPS is requested://HTTPS is indicated in nginx.com/$server _ADDR represents the server address $server _name represents the server name $server _port represents the server port $server _protocol represents the protocol that the server sends a response to the client, such as an HTTP/1.1 or http/1.0

If you want to reprint please specify the Source: http://www.ttlsa.com/html/2912.html

Variables provided by the Ngx_http_core_module module

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.