The following set of modules provides extra functionality that'll help you find out more information about the visitors, such as by parsing client request headers for browser name and version, assigning a identifier to requests presenting SI Milarities, and so on.BrowserThe Browser module parses the user-agent HTTP header of the client request in order to establish values For variables that can is employed later in the configuration. The three variabl
Over the past two days, I have solved a very interesting problem. I use a nginx server as a proxy, you need to be able to add a certification layer to enable it to use external authentication sources (such as a Web application) to authenticate, if the user has an account in the external authentication source, you can pass the certification agent.Demand List
I have considered several solutions, listed below:
Use a simple Python/flask module to
The nginx configuration file consists of the main section, events section, http section, sever section,
Location section and upstream section. Learn nginx modules based on this classification.
Main module: it mainly controls the user/user group to which the sub-process belongs, the number of child dispatching processes, the location/level of error logs, the pid
, 1k is sufficient to satisfy the buffer required by the request head;(2) for the request head carrying a large cookie or a WAP user, the 1k buffer is generally not enough, then the instruction large_client_header_buffers can be used.7. Client_header_timeoutMeaning: Sets the time-out period for the user request header.Syntax: Client_header_timeout Default: 1mScope: Http.server.locationExample: Client_header_timeout 3m;Note: This time-out is only set if the request header needs to be read more th
Find the nginx installation source code root directory. if not, download the new source code. http://nginx.org Tarxvzfnginx-1.3.2.tar.gz to view the ngixn version of the extremely compiled parameters/usr/local/nginx/sbin/nginx-V to enter the nginx source code directory cdnginx-1.3.2 below is re-programmed... "/> nginx
requests would be answered with a 503 Service unavailable HTTP Response. If you wish to log client requests that is affected by the limits you have set, enable the limit_conn_log_level Directive and specify the log level (Info | Notice | Warn | error).Limit RequestIn a similar fashion, the limit Request module allows your to limit the amount of requests for a defined zone.Defining the zone is done via the limit_req_zone directive; Its syntax differs from the Limit zone equivalent directive:Limi
function pointer that contains the origin implementationIp_hash and Round_robin can be similar to the policy model, which is to set different policies for request lookup IP in Init_upstream.The overall relationship of these three modules, similar to the relationship between builders, must be implemented and sequentially called Init_upstream,init,get,free functions.
Postscript:Round_robin provides a CREATE function for situations where resolved member
Recently on new projects, to build nginx to ensure security, the decision to install the WAF module, the following is the specific steps, first download the required installation package, for each installation:
wget http://luajit.org/download/LuaJIT-2.0.3.tar.gz
tar-zxvf luajit-2.0.3.tar.gz
cd LuaJIT-2.0.3
make Make
Install
Then download the Nginx,
wget http://nginx.org/download/
$uri: URI of the current request, without parameters$request _uri: URI of the request, with full parameters$host: The host header in the HTTP request message, or, if there is no host header in the request, to handle the hostname of the virtual host in this request instead;$hostname: Server host name of the Nginx service running$remote _addr: Client IP$remote _port: Port of the client$remote _user: The user name entered by the client user when using us
In fact, it should be called static loading of each module, because the loading process is actually completed during compilation, rather than dynamic loading according to the configuration file during runtime.
In such a scenario, a program has many modules, and the configuration of each module is written in its own code (may be. CPP, which may also be. h), simply declare it at the call and load it in. If this module is not needed one day, simply block
Fastcgi module: nginx works with fastcgi
Fastcgi_connect_timeout 200; fastcgi_send_timeout 200; fastcgi_read_timeout 200; fastcgi_buffer_size 4 k; fastcgi_buffers 16 4 k; limit 8 k; Limit 16 k; fail on; php returns an error to nginx
Note: The timeout value can be larger or the buffer size can be larger.
Gzip module: data compression and transmission
Gzip on; gzip_min_length 1 k; gzip_buffers 8 8 k; gz
is familiar with this thing.2. Use PHP-FPM. PHP-FPM is a fastcgi process manager for PHP. Configuration allows you to control the number of processes that process PHP requests concurrently.Specific can refer to: http://www.linuxde.net/2013/06/14638.htmlBut we don't use this scenario either, because the installation configuration process is cumbersome.3. Use the Nginx Ngx_http_limit_req_module to control the request.This module can limit the frequency
Copy Code code as follows:
Cd/opt
wget http://nginx.org/download/nginx-1.2.8.tar.gz
Tar zxvf/opt/nginx-1.2.8.tar.gz
wget https://nginx-upstream-jvm-route.googlecode.com/files/nginx-upstream-jvm-route-0.1.tar.gz
Tar Zxvf/opt/nginx_upstream_jvm_route
cd/opt/nginx-1.2
Understanding of Modulesmodule, which implements a set of code for a function with a mound code.Like functional programming and process-oriented programming, functional programming accomplishes a function, and other code is used to invoke it, providing reusability of code and coupling between the code. For a complex function, multiple functions may be required to complete (functions can be in different. py files), and the Code collection consisting of N. py files is called a module.such as: OS i
Common methods for modules and modules
Function-Type programming
Yield
Ternary operations
Lambda expression
Built-in Culvert number
Common modules
"Common methods for modules and modules"The critical __init__.py #包一定要有这个__init__. py file, he is t
Notation 1:--enable-zip
Notation 2:--enable-zip=shared
Does the notation 1 mean to be statically compiled?
Does the notation 2 mean dynamic compilation? will generate. so files? If so, what is the difference between using the Phpize command to
that support load balancing and caching. These additional features make Nginx an efficient toolset for building scalable web infrastructures.
February 2012, version of Apache 2.4.x released. Although new concurrent processing core modules and proxy modules have been added to enhance scalability and performance, it is too early to say whether performance, concurr
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.