connection_pool_size

Syntax: connection_pool_size size; Default: connection_pool_size 256|512; Context: http, server Allows accurate tuning of per-connection memory allocations. This directive has minimal impact on performance and should not generally be used. By default, the size is equal to 256 bytes on 32-bit platforms and 512 bytes on 64-bit platforms. Prior to version 1.9.8, the default value was 256 on all platforms.

Connection processing methods

Connection processing methods nginx supports a variety of connection processing methods. The availability of a particular method depends on the platform used. On platforms that support several methods nginx will normally select the most efficient method automatically. However, if needed, a connection processing method can be selected explicitly with the use directive. The following connection processing methods are supported: select — standard method. The supporting module is built automa

Configuring HTTPS servers

Configuring HTTPS servers HTTPS server optimization SSL certificate chains A single HTTP/HTTPS server Name-based HTTPS servers An SSL certificate with several names Server Name Indication Compatibility To configure an HTTPS server, the ssl parameter must be enabled on listening sockets in the server block, and the locations of the server certificate and private key files should be specified: server { listen 443 ssl; server_name www.example.com; ssl_certific

Configuration file measurement units

Configuration file measurement units Sizes can be specified in bytes, kilobytes (suffixes k and K) or megabytes (suffixes m and M), for example, “1024”, “8k”, “1m”. Time intervals can be specified in milliseconds, seconds, minutes, hours, days and so on, using the following suffixes: ms milliseconds s seconds m minutes h hours d days w weeks M months, 30 days y years, 365 days Multiple units can be combined in a single value by specifying them in the order from the most to the least sign

Command-line parameters

Command-line parameters nginx supports the following command-line parameters: -? | -h — print help for command-line parameters. -c file — use an alternative configuration file instead of a default file. -g directives — set global configuration directives, for example, nginx -g "pid /var/run/nginx.pid; worker_processes `sysctl -n hw.ncpu`;" -p prefix — set nginx path prefix, i.e. a directory that will keep server files (default value is /usr/local/nginx). -q — suppress non-error mes

client_max_body_size

Syntax: client_max_body_size size; Default: client_max_body_size 1m; Context: http, server, location Sets the maximum allowed size of the client request body, specified in the “Content-Length” request header field. If the size in a request exceeds the configured value, the 413 (Request Entity Too Large) error is returned to the client. Please be aware that browsers cannot correctly display this error. Setting size to 0 disables checking of client request body size.

client_header_timeout

Syntax: client_header_timeout time; Default: client_header_timeout 60s; Context: http, server Defines a timeout for reading client request header. If a client does not transmit the entire header within this time, the 408 (Request Time-out) error is returned to the client.

client_header_buffer_size

Syntax: client_header_buffer_size size; Default: client_header_buffer_size 1k; Context: http, server Sets buffer size for reading client request header. For most requests, a buffer of 1K bytes is enough. However, if a request includes long cookies, or comes from a WAP client, it may not fit into 1K. If a request line or a request header field does not fit into this buffer then larger buffers, configured by the large_client_header_buffers directive, are allocated.

client_body_timeout

Syntax: client_body_timeout time; Default: client_body_timeout 60s; Context: http, server, location Defines a timeout for reading client request body. The timeout is set only for a period between two successive read operations, not for the transmission of the whole request body. If a client does not transmit anything within this time, the 408 (Request Time-out) error is returned to the client.

client_body_temp_path

Syntax: client_body_temp_path path [level1 [level2 [level3]]]; Default: client_body_temp_path client_body_temp; Context: http, server, location Defines a directory for storing temporary files holding client request bodies. Up to three-level subdirectory hierarchy can be used under the specified directory. For example, in the following configuration client_body_temp_path /spool/nginx/client_temp 1 2; a path to a temporary file might look like this: /spool/ngin