In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains how to understand the variables provided by the nginx http kernel module. Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let Xiaobian take you to learn "how to understand the variables provided by the nginx http kernel module"!
The ngx_http_core_module has a large number of variables when processing requests. These variables can be recorded through the access log and can also be used for other nginx modules.
We will use some variables when we make policies on requests, such as rewriting, etc. By the way, we summarize the variables provided by the ngx_http_core_module module 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 www.ttlsa.com this value.$ args The full parameters in the HTTP request. For example, in the request/index.php? In width=400&height=200,$args represents the string width=400&height=200.$ binary_remote_addr Client address in binary format. For example: \x0A\xE0B\x0E$body_bytes_sent indicates the number of bytes in the packet part of the http response sent to the client $content_length indicates the Content-Length field in the client request header $content_type indicates the Content-Type field in the client request header $cookie_COOKIE indicates the cookie field in the client request header $document_root indicates the value of the root configuration item used by the current request $uri indicates the URI of the current request,$document_uri has the same meaning as $uri.$request_uri indicates the original request URI sent by the client, with full parameters.$ uri and $document_uri are not necessarily the original request of the user, they may be the redirected URI after internal redirection, while $request_uri never changes and is always the original URI of the client.$ host represents the Host field in the client request header. If the Host field does not exist, replace it with the name of the actual server being processed. If the Host field has a port, such as IP:PORT, then $host is removed from the port and its value is IP.$ Host is all lowercase. These properties are different from http_host in http_HEADER, which only takes the value corresponding to the Host header. $hostname represents the name of the machine where Nginx resides, the same value returned by gethostbyname calls.$http_HEADER represents the value of the corresponding header in the current HTTP request. HEADER name all lowercase. For example, the value corresponding to the Host header in the request is represented by the $http_host table $send_http_HEADER to represent the value of the corresponding header in the HTTP response returned to the client. HEADER name all lowercase. For example,$send_ http_content_type indicates the value corresponding to the Content-Type header in the response.$is_args indicates whether the URI in the request has parameters. If it has parameters, the value of $is_args is?. If there is no parameter, it is empty string $limit_rate indicates the speed limit of the current connection, 0 indicates unlimited speed $nginx_version indicates the version number of the current Nginx $query_string Parameters in the request URI, same as $args, However,$query_string is read-only and does not change $remote_addr indicates the address of the client $remote_port indicates the port used by the client connection $remote_user indicates the user name defined when using Auth Basic Module $request_filename represents the file path after the URI in the user request is converted into root or alias.$request_body represents the package body in the HTTP request. This parameter is only meaningful in proxy_pass or fastcgi_pass.$request_body_file represents the temporary file name stored in the package body in the HTTP request. When the request has been completed, its value is "ok." If it is not completed, it will return to the client, then its value is an empty string; or in the case of breakpoint continuation, etc., HTTP range is not the last block of the file, then its value is also an empty string.$ request_method represents the method name of HTTP request, such as GET, PUT, POST, etc.$scheme represents HTTP scheme, such as https in the request https://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 for the server to send a response to the client, such as HTTP/1.1 or HTTP/1.0 Here, I believe that everyone has a deeper understanding of "how to understand the variables provided by the nginx http kernel module", you may wish to actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.