Variables
The core module supports built-in variables, whose names correspond with the names of variables in Apache.
First of all, there are the variables, which represent the lines of the title of the client request, for example, $http_user_agent, $http_cookie, and so forth.
Furthermore, there are other variables:
Edit section: $arg_PARAMETER $arg_PARAMETERThis variable contains the value of the GET request variable PARAMETER if present in the query string
Edit section: $args $argsThis variable is equal to arguments in the line of request;
Edit section: $binary_remote_addr $binary_remote_addrThe address of the client in binary form;
Edit section: $body_bytes_sent $body_bytes_sent(undocumented)
Edit section: $content_length $content_lengthThis variable is equal to line Content-Length in the header of request;
Edit section: $content_type $content_typeThis variable is equal to line Content-Type in the header of request;
Edit section: $cookie_COOKIE $cookie_COOKIEThe value of the cookie COOKIE;
Edit section: $document_root $document_rootThis variable is equal to the value of directive root for the current request;
Edit section: $document_uri $document_uriThe same as $uri.
Edit section: $host $hostThis variable is equal to line Host in the header of request or name of the server processing the request if the Host header is not available.
This variable may have a different value from $http_host when the Host input header is absent or has an empty value.
Edit section: $http_HEADER $http_HEADERThe value of the HTTP header HEADER when converted to lowercase and with ‘dashes' converted to ‘underscores', e.g. $http_user_agent, $http_referer…;
Edit section: $is_args $is_argsEvaluates to “?” if $args is set, “” otherwise.
Edit section: $limit_rate $limit_rateThis variable allows limiting the connection rate.
Edit section: $query_string $query_stringThe same as $args.
Edit section: $remote_addr $remote_addrThe address of the client.
Edit section: $remote_port $remote_portThe port of the client;
Edit section: $remote_user $remote_userThis variable is equal to the name of user, authenticated by the Auth Basic Module;
Edit section: $request_filename $request_filenameThis variable is equal to path to the file for the current request, formed from directives root or alias and URI request;
Edit section: $request_body $request_bodyThis variable(0.7.58+) contains the body of the request. The significance of this variable appears in locations with directives proxy_pass or fastcgi_pass.
Edit section: $request_body_file $request_body_fileClient request body temporary filename;
Edit section: $request_completion $request_completion(undocumented)
Edit section: $request_method $request_methodThis variable is equal to the method of request, usually GET or POST.
新闻热点
疑难解答