What is the term used for the variable that receives an argument that passed into a module group of answer choices?

On FreeBSD, AIO can be used starting from FreeBSD 4.3. Prior to FreeBSD 11.0, AIO can either be linked statically into a kernel:

options VFS_AIO

or loaded dynamically as a kernel loadable module:

kldload aio

On Linux, AIO can be used starting from kernel version 2.6.22. Also, it is necessary to enable , or otherwise reading will be blocking:

location /video/ { aio on; directio 512; output_buffers 1 128k; }

On Linux, can only be used for reading blocks that are aligned on 512-byte boundaries (or 4K for XFS). File’s unaligned end is read in blocking mode. The same holds true for byte range requests and for FLV requests not from the beginning of a file: reading of unaligned data at the beginning and end of a file will be blocking.

When both AIO and are enabled on Linux, AIO is used for files that are larger than or equal to the size specified in the directive, while is used for files of smaller sizes or when is disabled.

location /video/ { sendfile on; aio on; directio 8m; }

Finally, files can be read and using multi-threading (1.7.11), without blocking a worker process:

location /video/ { sendfile on; aio threads; }

Read and send file operations are offloaded to threads of the specified . If the pool name is omitted, the pool with the name “aio off;41” is used. The pool name can also be set with variables:

aio threads=pool$disk;

By default, multi-threading is disabled, it should be enabled with the aio off;42 configuration parameter. Currently, multi-threading is compatible only with the , , and methods. Multi-threaded sending of files is only supported on Linux.

See also the directive.

Syntax:aio off;43 | aio off;29;
Default:aio_write off;Context:aio off;30, aio off;31, aio off;32

This directive appeared in version 1.9.13.

If is enabled, specifies whether it is used for writing files. Currently, this only works when using aio off;48 and is limited to writing temporary files with data received from proxied servers.

Syntax:aio off;49;
Default:—Context:aio off;32

Defines a replacement for the specified location. For example, with the following configuration

aio off;0

on request of “aio off;51”, the file aio off;52 will be sent.

The aio off;53 value can contain variables, except aio off;54 and aio off;55.

If aio off;56 is used inside a location defined with a regular expression then such regular expression should contain captures and aio off;56 should refer to these captures (0.7.40), for example:

aio off;1

When location matches the last part of the directive’s value:

aio off;2

it is better to use the directive instead:

aio off;3

Syntax:aio off;58;
Default:aio off;4Context:aio off;30, aio off;31, aio off;32

This directive appeared in version 1.17.10.

Delays processing of unauthorized requests with 401 response code to prevent timing attacks when access is limited by password, by the result of subrequest, or by JWT.

Syntax:aio off;62 | aio off;29;
Default:aio off;5Context:aio off;30, aio off;31, aio off;32

Allows disabling chunked transfer encoding in HTTP/1.1. It may come in handy when using a software failing to support chunked encoding despite the standard’s requirement.

Syntax:aio off;67;
Default:aio off;6Context:aio off;30, aio off;31, aio off;32

Sets buffer size for reading client request body. In case the request body is larger than the buffer, the whole body or only its part is written to a . By default, buffer size is equal to two memory pages. This is 8K on x86, other 32-bit platforms, and x86-64. It is usually 16K on other 64-bit platforms.

Syntax:aio off;71 | aio off;72 | aio off;29;
Default:aio off;7Context:aio off;30, aio off;31, aio off;32

Determines whether nginx should save the entire client request body into a file. This directive can be used during debugging, or when using the aio off;77 variable, or the method of the module ngx_http_perl_module.

When set to the value aio off;78, temporary files are not removed after request processing.

The value aio off;72 will cause the temporary files left after request processing to be removed.

Syntax:client_body_in_single_buffer aio off;78 | aio off;29;
Default:aio off;8Context:aio off;30, aio off;31, aio off;32

Determines whether nginx should save the entire client request body in a single buffer. The directive is recommended when using the aio off;85 variable, to save the number of copy operations involved.

Syntax:client_body_temp_path aio off;53 [aio off;87 [aio off;88 [aio off;89]]];
Default:aio off;9Context:aio off;30, aio off;31, aio off;32

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

location /video/ { aio on; output_buffers 1 64k; } 0

a path to a temporary file might look like this:

location /video/ { aio on; output_buffers 1 64k; } 1

Syntax:aio off;93;
Default:location /video/ { aio on; output_buffers 1 64k; } 2Context:aio off;30, aio off;31, aio off;32

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 request is terminated with the 408 (Request Time-out) error.

Syntax:aio off;97;
Default:location /video/ { aio on; output_buffers 1 64k; } 3Context:aio off;30, aio off;31

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 directive, are allocated.

If the directive is specified on the level, the value from the default server can be used. Details are provided in the “” section.

Syntax:location /video/ { aio on; output_buffers 1 64k; } 00;
Default:location /video/ { aio on; output_buffers 1 64k; } 4Context:aio off;30, aio off;31

Defines a timeout for reading client request header. If a client does not transmit the entire header within this time, the request is terminated with the 408 (Request Time-out) error.

Syntax:location /video/ { aio on; output_buffers 1 64k; } 03;
Default:location /video/ { aio on; output_buffers 1 64k; } 5Context:aio off;30, aio off;31, aio off;32

Sets the maximum allowed size of the client request body. 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 location /video/ { aio on; output_buffers 1 64k; } 07 to 0 disables checking of client request body size.

Syntax:connection_pool_size location /video/ { aio on; output_buffers 1 64k; } 07;
Default:location /video/ { aio on; output_buffers 1 64k; } 6Context:aio off;30, aio off;31

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.

Syntax:location /video/ { aio on; output_buffers 1 64k; } 11;
Default:location /video/ { aio on; output_buffers 1 64k; } 7Context:aio off;30, aio off;31, aio off;32

Defines the default MIME type of a response. Mapping of file name extensions to MIME types can be set with the directive.

Syntax:directio location /video/ { aio on; output_buffers 1 64k; } 07 | aio off;29;
Default:location /video/ { aio on; output_buffers 1 64k; } 8Context:aio off;30, aio off;31, aio off;32

This directive appeared in version 0.7.7.

Enables the use of the location /video/ { aio on; output_buffers 1 64k; } 20 flag (FreeBSD, Linux), the location /video/ { aio on; output_buffers 1 64k; } 21 flag (macOS), or the location /video/ { aio on; output_buffers 1 64k; } 22 function (Solaris), when reading files that are larger than or equal to the specified location /video/ { aio on; output_buffers 1 64k; } 07. The directive automatically disables (0.7.15) the use of for a given request. It can be useful for serving large files:

location /video/ { aio on; output_buffers 1 64k; } 9

or when using on Linux.

Syntax:directio_alignment location /video/ { aio on; output_buffers 1 64k; } 07;
Default:options VFS_AIO 0Context:aio off;30, aio off;31, aio off;32

This directive appeared in version 0.8.11.

Sets the alignment for . In most cases, a 512-byte alignment is enough. However, when using XFS under Linux, it needs to be increased to 4K.

Syntax:disable_symlinks aio off;29;
disable_symlinks aio off;78 | location /video/ { aio on; output_buffers 1 64k; } 30 [location /video/ { aio on; output_buffers 1 64k; } 31=location /video/ { aio on; output_buffers 1 64k; } 32];
Default:options VFS_AIO 1Context:aio off;30, aio off;31, aio off;32

This directive appeared in version 1.1.15.

Determines how symbolic links should be treated when opening files:

aio off;29Symbolic links in the pathname are allowed and not checked. This is the default behavior.aio off;78If any component of the pathname is a symbolic link, access to a file is denied.location /video/ { aio on; output_buffers 1 64k; } 30Access to a file is denied if any component of the pathname is a symbolic link, and the link and object that the link points to have different owners.location /video/ { aio on; output_buffers 1 64k; } 31=location /video/ { aio on; output_buffers 1 64k; } 32When checking symbolic links (parameters aio off;78 and location /video/ { aio on; output_buffers 1 64k; } 30), all components of the pathname are normally checked. Checking of symbolic links in the initial part of the pathname may be avoided by specifying additionally the location /video/ { aio on; output_buffers 1 64k; } 31=location /video/ { aio on; output_buffers 1 64k; } 32 parameter. In this case, symbolic links are checked only from the pathname component that follows the specified initial part. If the value is not an initial part of the pathname checked, the whole pathname is checked as if this parameter was not specified at all. If the value matches the whole file name, symbolic links are not checked. The parameter value can contain variables.

Example:

options VFS_AIO 2

This directive is only available on systems that have the location /video/ { aio on; output_buffers 1 64k; } 45 and location /video/ { aio on; output_buffers 1 64k; } 46 interfaces. Such systems include modern versions of FreeBSD, Linux, and Solaris.

Parameters aio off;78 and location /video/ { aio on; output_buffers 1 64k; } 30 add a processing overhead.

On systems that do not support opening of directories only for search, to use these parameters it is required that worker processes have read permissions for all directories being checked.
The ngx_http_autoindex_module, ngx_http_random_index_module, and ngx_http_dav_module modules currently ignore this directive.

Syntax:location /video/ { aio on; output_buffers 1 64k; } 49 ... [aio off;36[location /video/ { aio on; output_buffers 1 64k; } 51]] location /video/ { aio on; output_buffers 1 64k; } 52;
Default:—Context:aio off;30, aio off;31, aio off;32, location /video/ { aio on; output_buffers 1 64k; } 56

Defines the URI that will be shown for the specified errors. A location /video/ { aio on; output_buffers 1 64k; } 52 value can contain variables.

Example:

options VFS_AIO 3

This causes an internal redirect to the specified location /video/ { aio on; output_buffers 1 64k; } 52 with the client request method changed to “location /video/ { aio on; output_buffers 1 64k; } 59” (for all methods other than “location /video/ { aio on; output_buffers 1 64k; } 59” and “location /video/ { aio on; output_buffers 1 64k; } 61”).

Furthermore, it is possible to change the response code to another using the “aio off;36location /video/ { aio on; output_buffers 1 64k; } 51” syntax, for example:

options VFS_AIO 4

If an error response is processed by a proxied server or a FastCGI/uwsgi/SCGI/gRPC server, and the server may return different response codes (e.g., 200, 302, 401 or 404), it is possible to respond with the code it returns:

options VFS_AIO 5

If there is no need to change URI and method during internal redirection it is possible to pass error processing into a named location:

options VFS_AIO 6
If location /video/ { aio on; output_buffers 1 64k; } 52 processing leads to an error, the status code of the last occurred error is returned to the client.

It is also possible to use URL redirects for error processing:

options VFS_AIO 7

In this case, by default, the response code 302 is returned to the client. It can only be changed to one of the redirect status codes (301, 302, 303, 307, and 308).

The code 307 was not treated as a redirect until versions 1.1.16 and 1.0.13.
The code 308 was not treated as a redirect until version 1.13.0.

These directives are inherited from the previous configuration level if and only if there are no location /video/ { aio on; output_buffers 1 64k; } 65 directives defined on the current level.

Syntax:etag aio off;78 | aio off;29;
Default:options VFS_AIO 8Context:aio off;30, aio off;31, aio off;32

This directive appeared in version 1.3.3.

Enables or disables automatic generation of the “ETag” response header field for static resources.

Syntax:location /video/ { aio on; output_buffers 1 64k; } 71
Default:—Context:location /video/ { aio on; output_buffers 1 64k; } 72

Provides the configuration file context in which the HTTP server directives are specified.

Syntax:if_modified_since aio off;29 | location /video/ { aio on; output_buffers 1 64k; } 74 | location /video/ { aio on; output_buffers 1 64k; } 75;
Default:options VFS_AIO 9Context:aio off;30, aio off;31, aio off;32

This directive appeared in version 0.7.24.

Specifies how to compare modification time of a response with the time in the “If-Modified-Since” request header field:

aio off;29the “If-Modified-Since” request header field is ignored (0.7.34);location /video/ { aio on; output_buffers 1 64k; } 74exact match;location /video/ { aio on; output_buffers 1 64k; } 75modification time of a response is less than or equal to the time in the “If-Modified-Since” request header field.

Syntax:ignore_invalid_headers aio off;78 | aio off;29;
Default:kldload aio 0Context:aio off;30, aio off;31

Controls whether header fields with invalid names should be ignored. Valid names are composed of English letters, digits, hyphens, and possibly underscores (as controlled by the directive).

If the directive is specified on the level, the value from the default server can be used. Details are provided in the “” section.

Syntax:location /video/ { aio on; output_buffers 1 64k; } 86
Default:—Context:aio off;32

Specifies that a given location can only be used for internal requests. For external requests, the client error 404 (Not Found) is returned. Internal requests are the following:

Example:

kldload aio 1
There is a limit of 10 internal redirects per request to prevent request processing cycles that can occur in incorrect configurations. If this limit is reached, the error 500 (Internal Server Error) is returned. In such cases, the “rewrite or internal redirection cycle” message can be seen in the error log.

Syntax:location /video/ { aio on; output_buffers 1 64k; } 88 | location /video/ { aio on; output_buffers 1 64k; } 89 ...;
Default:kldload aio 2Context:aio off;30, aio off;31, aio off;32

Disables keep-alive connections with misbehaving browsers. The location /video/ { aio on; output_buffers 1 64k; } 89 parameters specify which browsers will be affected. The value location /video/ { aio on; output_buffers 1 64k; } 94 disables keep-alive connections with old versions of MSIE, once a POST request is received. The value location /video/ { aio on; output_buffers 1 64k; } 95 disables keep-alive connections with Safari and Safari-like browsers on macOS and macOS-like operating systems. The value location /video/ { aio on; output_buffers 1 64k; } 96 enables keep-alive connections with all browsers.

Prior to version 1.1.18, the value location /video/ { aio on; output_buffers 1 64k; } 95 matched all Safari and Safari-like browsers on all operating systems, and keep-alive connections with them were disabled by default.

Syntax:location /video/ { aio on; output_buffers 1 64k; } 98;
Default:kldload aio 3Context:aio off;30, aio off;31, aio off;32

This directive appeared in version 0.8.0.

Sets the maximum number of requests that can be served through one keep-alive connection. After the maximum number of requests are made, the connection is closed.

Closing connections periodically is necessary to free per-connection memory allocations. Therefore, using too high maximum number of requests could result in excessive memory usage and not recommended.

Prior to version 1.19.10, the default value was 100.

Syntax:options VFS_AIO 02;
Default:kldload aio 4Context:aio off;30, aio off;31, aio off;32

This directive appeared in version 1.19.10.

Limits the maximum time during which requests can be processed through one keep-alive connection. After this time is reached, the connection is closed following the subsequent request processing.

Syntax:options VFS_AIO 06 [options VFS_AIO 07];
Default:kldload aio 5Context:aio off;30, aio off;31, aio off;32

The first parameter sets a timeout during which a keep-alive client connection will stay open on the server side. The zero value disables keep-alive client connections. The optional second parameter sets a value in the “Keep-Alive: timeout=options VFS_AIO 11” response header field. Two parameters may differ.

The “Keep-Alive: timeout=options VFS_AIO 11” header field is recognized by Mozilla and Konqueror. MSIE closes keep-alive connections by itself in about 60 seconds.

Syntax:options VFS_AIO 13 location /video/ { aio on; output_buffers 1 64k; } 07;
Default:kldload aio 6Context:aio off;30, aio off;31

Sets the maximum options VFS_AIO 17 and location /video/ { aio on; output_buffers 1 64k; } 07 of buffers used for reading large client request header. A request line cannot exceed the size of one buffer, or the 414 (Request-URI Too Large) error is returned to the client. A request header field cannot exceed the size of one buffer as well, or the 400 (Bad Request) error is returned to the client. Buffers are allocated only on demand. By default, the buffer size is equal to 8K bytes. If after the end of request processing a connection is transitioned into the keep-alive state, these buffers are released.

If the directive is specified on the level, the value from the default server can be used. Details are provided in the “” section.

Syntax:options VFS_AIO 19 ... { ... }
Default:—Context:aio off;32

Limits allowed HTTP methods inside a location. The options VFS_AIO 21 parameter can be one of the following: location /video/ { aio on; output_buffers 1 64k; } 59, location /video/ { aio on; output_buffers 1 64k; } 61, options VFS_AIO 24, options VFS_AIO 25, options VFS_AIO 26, options VFS_AIO 27, options VFS_AIO 28, options VFS_AIO 29, options VFS_AIO 30, options VFS_AIO 31, options VFS_AIO 32, options VFS_AIO 33, options VFS_AIO 34, or options VFS_AIO 35. Allowing the location /video/ { aio on; output_buffers 1 64k; } 59 method makes the location /video/ { aio on; output_buffers 1 64k; } 61 method also allowed. Access to other methods can be limited using the ngx_http_access_module, ngx_http_auth_basic_module, and ngx_http_auth_jwt_module (1.13.10) modules directives:

kldload aio 7

Please note that this will limit access to all methods except GET and HEAD.

Syntax:options VFS_AIO 38;
Default:kldload aio 8Context:aio off;30, aio off;31, aio off;32, location /video/ { aio on; output_buffers 1 64k; } 56

Limits the rate of response transmission to a client. The options VFS_AIO 43 is specified in bytes per second. The zero value disables rate limiting. The limit is set per a request, and so if a client simultaneously opens two connections, the overall rate will be twice as much as the specified limit.

Parameter value can contain variables (1.17.0). It may be useful in cases where rate should be limited depending on a certain condition:

kldload aio 9

Rate limit can also be set in the variable, however, since version 1.17.0, this method is not recommended:

location /video/ { aio on; directio 512; output_buffers 1 128k; } 0

Rate limit can also be set in the “X-Accel-Limit-Rate” header field of a proxied server response. This capability can be disabled using the , , , and directives.

Syntax:limit_rate_after location /video/ { aio on; output_buffers 1 64k; } 07;
Default:location /video/ { aio on; directio 512; output_buffers 1 128k; } 1Context:aio off;30, aio off;31, aio off;32, location /video/ { aio on; output_buffers 1 64k; } 56

This directive appeared in version 0.8.0.

Sets the initial amount after which the further transmission of a response to a client will be rate limited. Parameter value can contain variables (1.17.0).

Example:

location /video/ { aio on; directio 512; output_buffers 1 128k; } 2

Syntax:lingering_close aio off;29 | aio off;78 | options VFS_AIO 52;
Default:location /video/ { aio on; directio 512; output_buffers 1 128k; } 3Context:aio off;30, aio off;31, aio off;32

This directive appeared in versions 1.1.0 and 1.0.6.

Controls how nginx closes client connections.

The default value “aio off;78” instructs nginx to and additional data from a client before fully closing a connection, but only if heuristics suggests that a client may be sending more data.

The value “options VFS_AIO 52” will cause nginx to unconditionally wait for and process additional client data.

The value “aio off;29” tells nginx to never wait for more data and close the connection immediately. This behavior breaks the protocol and should not be used under normal circumstances.

To control closing HTTP/2 connections, the directive must be specified on the level (1.19.1).

Syntax:lingering_time options VFS_AIO 11;
Default:location /video/ { aio on; directio 512; output_buffers 1 128k; } 4Context:aio off;30, aio off;31, aio off;32

When is in effect, this directive specifies the maximum time during which nginx will process (read and ignore) additional data coming from a client. After that, the connection will be closed, even if there will be more data.

Syntax:lingering_timeout options VFS_AIO 11;
Default:location /video/ { aio on; directio 512; output_buffers 1 128k; } 5Context:aio off;30, aio off;31, aio off;32

When is in effect, this directive specifies the maximum waiting time for more client data to arrive. If data are not received during this time, the connection is closed. Otherwise, the data are read and ignored, and nginx starts waiting for more data again. The “wait-read-ignore” cycle is repeated, but no longer than specified by the directive.

Syntax:options VFS_AIO 67[:options VFS_AIO 68] [options VFS_AIO 69] [options VFS_AIO 70] [options VFS_AIO 71 | options VFS_AIO 72] [options VFS_AIO 73] [options VFS_AIO 74=options VFS_AIO 17] [options VFS_AIO 76=options VFS_AIO 17] [options VFS_AIO 78=options VFS_AIO 17] [options VFS_AIO 80=location /video/ { aio on; output_buffers 1 64k; } 07] [options VFS_AIO 82=location /video/ { aio on; output_buffers 1 64k; } 07] [options VFS_AIO 84=options VFS_AIO 85] [options VFS_AIO 86] [options VFS_AIO 87] [options VFS_AIO 88=aio off;78|aio off;29] [options VFS_AIO 91] [options VFS_AIO 92=aio off;78|aio off;29|[options VFS_AIO 95]:[options VFS_AIO 96]:[options VFS_AIO 97]];
listen options VFS_AIO 68 [options VFS_AIO 69] [options VFS_AIO 70] [options VFS_AIO 71 | options VFS_AIO 72] [options VFS_AIO 73] [options VFS_AIO 74=options VFS_AIO 17] [options VFS_AIO 76=options VFS_AIO 17] [options VFS_AIO 78=options VFS_AIO 17] [options VFS_AIO 80=location /video/ { aio on; output_buffers 1 64k; } 07] [options VFS_AIO 82=location /video/ { aio on; output_buffers 1 64k; } 07] [options VFS_AIO 84=options VFS_AIO 85] [options VFS_AIO 86] [options VFS_AIO 87] [options VFS_AIO 88=aio off;78|aio off;29] [options VFS_AIO 91] [options VFS_AIO 92=aio off;78|aio off;29|[options VFS_AIO 95]:[options VFS_AIO 96]:[options VFS_AIO 97]];
kldload aio 28aio off;53 [options VFS_AIO 69] [options VFS_AIO 70] [options VFS_AIO 71 | options VFS_AIO 72] [options VFS_AIO 73] [options VFS_AIO 78=options VFS_AIO 17] [options VFS_AIO 80=location /video/ { aio on; output_buffers 1 64k; } 07] [options VFS_AIO 82=location /video/ { aio on; output_buffers 1 64k; } 07] [options VFS_AIO 84=options VFS_AIO 85] [options VFS_AIO 86] [options VFS_AIO 87] [options VFS_AIO 92=aio off;78|aio off;29|[options VFS_AIO 95]:[options VFS_AIO 96]:[options VFS_AIO 97]];
Default:location /video/ { aio on; directio 512; output_buffers 1 128k; } 6Context:aio off;31

Sets the kldload aio 52 and options VFS_AIO 68 for IP, or the aio off;53 for a UNIX-domain socket on which the server will accept requests. Both kldload aio 52 and options VFS_AIO 68, or only kldload aio 52 or only options VFS_AIO 68 can be specified. An kldload aio 52 may also be a hostname, for example:

location /video/ { aio on; directio 512; output_buffers 1 128k; } 7

IPv6 addresses (0.7.36) are specified in square brackets:

location /video/ { aio on; directio 512; output_buffers 1 128k; } 8

UNIX-domain sockets (0.8.21) are specified with the “kldload aio 60” prefix:

location /video/ { aio on; directio 512; output_buffers 1 128k; } 9

If only kldload aio 52 is given, the port 80 is used.

If the directive is not present then either kldload aio 62 is used if nginx runs with the superuser privileges, or kldload aio 63 otherwise.

The options VFS_AIO 69 parameter, if present, will cause the server to become the default server for the specified kldload aio 52:options VFS_AIO 68 pair. If none of the directives have the options VFS_AIO 69 parameter then the first server with the kldload aio 52:options VFS_AIO 68 pair will be the default server for this pair.

In versions prior to 0.8.21 this parameter is named simply aio off;41.

The options VFS_AIO 70 parameter (0.7.14) allows specifying that all connections accepted on this port should work in SSL mode. This allows for a more compact for the server that handles both HTTP and HTTPS requests.

The options VFS_AIO 71 parameter (1.9.5) configures the port to accept HTTP/2 connections. Normally, for this to work the options VFS_AIO 70 parameter should be specified as well, but nginx can also be configured to accept HTTP/2 connections without SSL.

The options VFS_AIO 72 parameter (1.3.15-1.9.4) allows accepting SPDY connections on this port. Normally, for this to work the options VFS_AIO 70 parameter should be specified as well, but nginx can also be configured to accept SPDY connections without SSL.

The options VFS_AIO 73 parameter (1.5.12) allows specifying that all connections accepted on this port should use the PROXY protocol.

The PROXY protocol version 2 is supported since version 1.13.11.

The kldload aio 77 directive can have several additional parameters specific to socket-related system calls. These parameters can be specified in any kldload aio 77 directive, but only once for a given kldload aio 52:options VFS_AIO 68 pair.

In versions prior to 0.8.21, they could only be specified in the kldload aio 77 directive together with the aio off;41 parameter.
options VFS_AIO 74=options VFS_AIO 17this parameter (0.8.44) sets the associated routing table, FIB (the kldload aio 85 option) for the listening socket. This currently works only on FreeBSD.options VFS_AIO 76=options VFS_AIO 17enables “TCP Fast Open” for the listening socket (1.5.8) and the maximum length for the queue of connections that have not yet completed the three-way handshake.
Do not enable this feature unless the server can handle receiving the more than once.
options VFS_AIO 78=options VFS_AIO 17sets the options VFS_AIO 78 parameter in the kldload aio 91 call that limits the maximum length for the queue of pending connections. By default, options VFS_AIO 78 is set to -1 on FreeBSD, DragonFly BSD, and macOS, and to 511 on other platforms.options VFS_AIO 80=location /video/ { aio on; output_buffers 1 64k; } 07sets the receive buffer size (the kldload aio 95 option) for the listening socket.options VFS_AIO 82=location /video/ { aio on; output_buffers 1 64k; } 07sets the send buffer size (the kldload aio 98 option) for the listening socket.options VFS_AIO 84=options VFS_AIO 85sets the name of accept filter (the location /video/ { aio on; directio 512; output_buffers 1 128k; } 01 option) for the listening socket that filters incoming connections before passing them to location /video/ { aio on; directio 512; output_buffers 1 128k; } 02. This works only on FreeBSD and NetBSD 5.0+. Possible values are dataready and httpready.options VFS_AIO 86instructs to use a deferred location /video/ { aio on; directio 512; output_buffers 1 128k; } 02 (the location /video/ { aio on; directio 512; output_buffers 1 128k; } 05 socket option) on Linux.options VFS_AIO 87instructs to make a separate location /video/ { aio on; directio 512; output_buffers 1 128k; } 07 call for a given kldload aio 52:options VFS_AIO 68 pair. This is useful because if there are several kldload aio 77 directives with the same port but different addresses, and one of the kldload aio 77 directives listens on all addresses for the given port (location /video/ { aio on; directio 512; output_buffers 1 128k; } 12options VFS_AIO 68), nginx will location /video/ { aio on; directio 512; output_buffers 1 128k; } 07 only to location /video/ { aio on; directio 512; output_buffers 1 128k; } 12options VFS_AIO 68. It should be noted that the location /video/ { aio on; directio 512; output_buffers 1 128k; } 17 system call will be made in this case to determine the address that accepted the connection. If the options VFS_AIO 74, options VFS_AIO 76, options VFS_AIO 78, options VFS_AIO 80, options VFS_AIO 82, options VFS_AIO 84, options VFS_AIO 86, options VFS_AIO 88, options VFS_AIO 91, or options VFS_AIO 92 parameters are used then for a given kldload aio 52:options VFS_AIO 68 pair a separate location /video/ { aio on; directio 512; output_buffers 1 128k; } 07 call will always be made.options VFS_AIO 88=aio off;78|aio off;29this parameter (0.7.42) determines (via the location /video/ { aio on; directio 512; output_buffers 1 128k; } 34 socket option) whether an IPv6 socket listening on a wildcard address location /video/ { aio on; directio 512; output_buffers 1 128k; } 35 will accept only IPv6 connections or both IPv6 and IPv4 connections. This parameter is turned on by default. It can only be set once on start.
Prior to version 1.3.4, if this parameter was omitted then the operating system’s settings were in effect for the socket.
options VFS_AIO 91this parameter (1.9.1) instructs to create an individual listening socket for each worker process (using the location /video/ { aio on; directio 512; output_buffers 1 128k; } 37 socket option on Linux 3.9+ and DragonFly BSD, or location /video/ { aio on; directio 512; output_buffers 1 128k; } 38 on FreeBSD 12+), allowing a kernel to distribute incoming connections between worker processes. This currently works only on Linux 3.9+, DragonFly BSD, and FreeBSD 12+ (1.15.1).
Inappropriate use of this option may have its security implications.
options VFS_AIO 92=aio off;78|aio off;29|[options VFS_AIO 95]:[options VFS_AIO 96]:[options VFS_AIO 97]this parameter (1.1.11) configures the “TCP keepalive” behavior for the listening socket. If this parameter is omitted then the operating system’s settings will be in effect for the socket. If it is set to the value “aio off;78”, the location /video/ { aio on; directio 512; output_buffers 1 128k; } 46 option is turned on for the socket. If it is set to the value “aio off;29”, the location /video/ { aio on; directio 512; output_buffers 1 128k; } 46 option is turned off for the socket. Some operating systems support setting of TCP keepalive parameters on a per-socket basis using the location /video/ { aio on; directio 512; output_buffers 1 128k; } 49, location /video/ { aio on; directio 512; output_buffers 1 128k; } 50, and location /video/ { aio on; directio 512; output_buffers 1 128k; } 51 socket options. On such systems (currently, Linux 2.4+, NetBSD 5+, and FreeBSD 9.0-STABLE), they can be configured using the options VFS_AIO 95, options VFS_AIO 96, and options VFS_AIO 97 parameters. One or two parameters may be omitted, in which case the system default setting for the corresponding socket option will be in effect. For example,
location /video/ { sendfile on; aio on; directio 8m; } 0
will set the idle timeout (location /video/ { aio on; directio 512; output_buffers 1 128k; } 49) to 30 minutes, leave the probe interval (location /video/ { aio on; directio 512; output_buffers 1 128k; } 50) at its system default, and set the probes count (location /video/ { aio on; directio 512; output_buffers 1 128k; } 51) to 10 probes.

Example:

location /video/ { sendfile on; aio on; directio 8m; } 1

Syntax:location [ aio off;36 | location /video/ { aio on; directio 512; output_buffers 1 128k; } 59 | location /video/ { aio on; directio 512; output_buffers 1 128k; } 60 | location /video/ { aio on; directio 512; output_buffers 1 128k; } 61 ] location /video/ { aio on; output_buffers 1 64k; } 52 { ... }
location /video/ { aio on; directio 512; output_buffers 1 128k; } 63location /video/ { aio on; directio 512; output_buffers 1 128k; } 64 { ... }
Default:—Context:aio off;31, aio off;32

Sets configuration depending on a request URI.

The matching is performed against a normalized URI, after decoding the text encoded in the “location /video/ { aio on; directio 512; output_buffers 1 128k; } 67” form, resolving references to relative path components “location /video/ { aio on; directio 512; output_buffers 1 128k; } 68” and “location /video/ { aio on; directio 512; output_buffers 1 128k; } 69”, and possible of two or more adjacent slashes into a single slash.

A location can either be defined by a prefix string, or by a regular expression. Regular expressions are specified with the preceding “location /video/ { aio on; directio 512; output_buffers 1 128k; } 60” modifier (for case-insensitive matching), or the “location /video/ { aio on; directio 512; output_buffers 1 128k; } 59” modifier (for case-sensitive matching). To find location matching a given request, nginx first checks locations defined using the prefix strings (prefix locations). Among them, the location with the longest matching prefix is selected and remembered. Then regular expressions are checked, in the order of their appearance in the configuration file. The search of regular expressions terminates on the first match, and the corresponding configuration is used. If no match with a regular expression is found then the configuration of the prefix location remembered earlier is used.

aio off;32 blocks can be nested, with some exceptions mentioned below.

For case-insensitive operating systems such as macOS and Cygwin, matching with prefix strings ignores a case (0.7.7). However, comparison is limited to one-byte locales.

Regular expressions can contain captures (0.7.40) that can later be used in other directives.

If the longest matching prefix location has the “location /video/ { aio on; directio 512; output_buffers 1 128k; } 61” modifier then regular expressions are not checked.

Also, using the “aio off;36” modifier it is possible to define an exact match of URI and location. If an exact match is found, the search terminates. For example, if a “location /video/ { aio on; directio 512; output_buffers 1 128k; } 75” request happens frequently, defining “location /video/ { aio on; directio 512; output_buffers 1 128k; } 76” will speed up the processing of these requests, as search terminates right after the first comparison. Such a location cannot obviously contain nested locations.

In versions from 0.7.1 to 0.8.41, if a request matched the prefix location without the “aio off;36” and “location /video/ { aio on; directio 512; output_buffers 1 128k; } 61” modifiers, the search also terminated and regular expressions were not checked.

Let’s illustrate the above by an example:

location /video/ { sendfile on; aio on; directio 8m; } 2

The “location /video/ { aio on; directio 512; output_buffers 1 128k; } 75” request will match configuration A, the “location /video/ { aio on; directio 512; output_buffers 1 128k; } 80” request will match configuration B, the “location /video/ { aio on; directio 512; output_buffers 1 128k; } 81” request will match configuration C, the “location /video/ { aio on; directio 512; output_buffers 1 128k; } 82” request will match configuration D, and the “location /video/ { aio on; directio 512; output_buffers 1 128k; } 83” request will match configuration E.

The “location /video/ { aio on; directio 512; output_buffers 1 128k; } 84” prefix defines a named location. Such a location is not used for a regular request processing, but instead used for request redirection. They cannot be nested, and cannot contain nested locations.

If a location is defined by a prefix string that ends with the slash character, and requests are processed by one of , , , , , or , then the special processing is performed. In response to a request with URI equal to this string, but without the trailing slash, a permanent redirect with the code 301 will be returned to the requested URI with the slash appended. If this is not desired, an exact match of the URI and location could be defined like this:

location /video/ { sendfile on; aio on; directio 8m; } 3

Syntax:log_not_found aio off;78 | aio off;29;
Default:location /video/ { sendfile on; aio on; directio 8m; } 4Context:aio off;30, aio off;31, aio off;32

Enables or disables logging of errors about not found files into .

Syntax:log_subrequest aio off;78 | aio off;29;
Default:location /video/ { sendfile on; aio on; directio 8m; } 5Context:aio off;30, aio off;31, aio off;32

Enables or disables logging of subrequests into .

Syntax:max_ranges options VFS_AIO 17;
Default:—Context:aio off;30, aio off;31, aio off;32

This directive appeared in version 1.1.2.

Limits the maximum allowed number of ranges in byte-range requests. Requests that exceed the limit are processed as if there were no byte ranges specified. By default, the number of ranges is not limited. The zero value disables the byte-range support completely.

Syntax:merge_slashes aio off;78 | aio off;29;
Default:location /video/ { sendfile on; aio on; directio 8m; } 6Context:aio off;30, aio off;31

Enables or disables compression of two or more adjacent slashes in a URI into a single slash.

Note that compression is essential for the correct matching of prefix string and regular expression locations. Without it, the “location /video/ { sendfile on; aio on; directio 8m; } 03” request would not match

location /video/ { sendfile on; aio on; directio 8m; } 7

and might be processed as a static file. So it gets converted to “location /video/ { sendfile on; aio on; directio 8m; } 04”.

Turning the compression aio off;29 can become necessary if a URI contains base64-encoded names, since base64 uses the “location /video/ { aio on; directio 512; output_buffers 1 128k; } 75” character internally. However, for security considerations, it is better to avoid turning the compression off.

If the directive is specified on the level, the value from the default server can be used. Details are provided in the “” section.

Syntax:msie_padding aio off;78 | aio off;29;
Default:location /video/ { sendfile on; aio on; directio 8m; } 8Context:aio off;30, aio off;31, aio off;32

Enables or disables adding comments to responses for MSIE clients with status greater than 400 to increase the response size to 512 bytes.

Syntax:msie_refresh aio off;78 | aio off;29;
Default:location /video/ { sendfile on; aio on; directio 8m; } 9Context:aio off;30, aio off;31, aio off;32

Enables or disables issuing refreshes instead of redirects for MSIE clients.

Syntax:open_file_cache aio off;29;
location /video/ { sendfile on; aio on; directio 8m; } 18=location /video/ { sendfile on; aio on; directio 8m; } 19 [location /video/ { sendfile on; aio on; directio 8m; } 20=options VFS_AIO 11];
Default:location /video/ { sendfile on; aio threads; } 0Context:aio off;30, aio off;31, aio off;32

Configures a cache that can store:

  • open file descriptors, their sizes and modification times;
  • information on existence of directories;
  • file lookup errors, such as “file not found”, “no read permission”, and so on.
    Caching of errors should be enabled separately by the directive.

The directive has the following parameters:

location /video/ { sendfile on; aio on; directio 8m; } 25sets the maximum number of elements in the cache; on cache overflow the least recently used (LRU) elements are removed;location /video/ { sendfile on; aio on; directio 8m; } 20defines a time after which an element is removed from the cache if it has not been accessed during this time; by default, it is 60 seconds;aio off;29disables the cache.

Example:

location /video/ { sendfile on; aio threads; } 1

Syntax:open_file_cache_errors aio off;78 | aio off;29;
Default:location /video/ { sendfile on; aio threads; } 2Context:aio off;30, aio off;31, aio off;32

Enables or disables caching of file lookup errors by .

Syntax:open_file_cache_min_uses options VFS_AIO 17;
Default:location /video/ { sendfile on; aio threads; } 3Context:aio off;30, aio off;31, aio off;32

Sets the minimum options VFS_AIO 17 of file accesses during the period configured by the location /video/ { sendfile on; aio on; directio 8m; } 20 parameter of the directive, required for a file descriptor to remain open in the cache.

Syntax:open_file_cache_valid options VFS_AIO 11;
Default:location /video/ { sendfile on; aio threads; } 4Context:aio off;30, aio off;31, aio off;32

Sets a time after which elements should be validated.

Syntax:output_buffers options VFS_AIO 17 location /video/ { aio on; output_buffers 1 64k; } 07;
Default:location /video/ { sendfile on; aio threads; } 5Context:aio off;30, aio off;31, aio off;32

Sets the options VFS_AIO 17 and location /video/ { aio on; output_buffers 1 64k; } 07 of the buffers used for reading a response from a disk.

Prior to version 1.9.5, the default value was 1 32k.

Syntax:port_in_redirect aio off;78 | aio off;29;
Default:location /video/ { sendfile on; aio threads; } 6Context:aio off;30, aio off;31, aio off;32

Enables or disables specifying the port in redirects issued by nginx.

The use of the primary server name in redirects is controlled by the directive.

Syntax:postpone_output location /video/ { aio on; output_buffers 1 64k; } 07;
Default:location /video/ { sendfile on; aio threads; } 7Context:aio off;30, aio off;31, aio off;32

If possible, the transmission of client data will be postponed until nginx has at least location /video/ { aio on; output_buffers 1 64k; } 07 bytes of data to send. The zero value disables postponing data transmission.

Syntax:read_ahead location /video/ { aio on; output_buffers 1 64k; } 07;
Default:location /video/ { sendfile on; aio threads; } 8Context:aio off;30, aio off;31, aio off;32

Sets the amount of pre-reading for the kernel when working with file.

On Linux, the location /video/ { sendfile on; aio on; directio 8m; } 64 system call is used, and so the location /video/ { aio on; output_buffers 1 64k; } 07 parameter is ignored.

On FreeBSD, the location /video/ { sendfile on; aio on; directio 8m; } 66 location /video/ { aio on; output_buffers 1 64k; } 07location /video/ { sendfile on; aio on; directio 8m; } 68 system call, supported since FreeBSD 9.0-CURRENT, is used. FreeBSD 7 has to be patched.

Syntax:recursive_error_pages aio off;78 | aio off;29;
Default:location /video/ { sendfile on; aio threads; } 9Context:aio off;30, aio off;31, aio off;32

Enables or disables doing several redirects using the directive. The number of such redirects is .

Syntax:request_pool_size location /video/ { aio on; output_buffers 1 64k; } 07;
Default:aio threads=pool$disk; 0Context:aio off;30, aio off;31

Allows accurate tuning of per-request memory allocations. This directive has minimal impact on performance and should not generally be used.

Syntax:reset_timedout_connection aio off;78 | aio off;29;
Default:aio threads=pool$disk; 1Context:aio off;30, aio off;31, aio off;32

Enables or disables resetting timed out connections and connections with the non-standard code 444 (1.15.2). The reset is performed as follows. Before closing a socket, the location /video/ { sendfile on; aio on; directio 8m; } 82 option is set on it with a timeout value of 0. When the socket is closed, TCP RST is sent to the client, and all memory occupied by this socket is released. This helps avoid keeping an already closed socket with filled buffers in a FIN_WAIT1 state for a long time.

It should be noted that timed out keep-alive connections are closed normally.

Syntax:resolver kldload aio 52 ... [location /video/ { sendfile on; aio on; directio 8m; } 84=options VFS_AIO 11] [location /video/ { sendfile on; aio on; directio 8m; } 86=aio off;78|aio off;29] [location /video/ { sendfile on; aio on; directio 8m; } 89=aio off;78|aio off;29] [location /video/ { sendfile on; aio on; directio 8m; } 92=location /video/ { sendfile on; aio on; directio 8m; } 93];
Default:—Context:aio off;30, aio off;31, aio off;32

Configures name servers used to resolve names of upstream servers into addresses, for example:

aio threads=pool$disk; 2

The address can be specified as a domain name or IP address, with an optional port (1.3.1, 1.2.2). If port is not specified, the port 53 is used. Name servers are queried in a round-robin fashion.

Before version 1.1.7, only a single name server could be configured. Specifying name servers using IPv6 addresses is supported starting from versions 1.3.1 and 1.2.2.

By default, nginx will look up both IPv4 and IPv6 addresses while resolving. If looking up of IPv4 or IPv6 addresses is not desired, the location /video/ { sendfile on; aio on; directio 8m; } 97 (1.23.1) or the location /video/ { sendfile on; aio on; directio 8m; } 98 parameter can be specified.

Resolving of names into IPv6 addresses is supported starting from version 1.5.8.

By default, nginx caches answers using the TTL value of a response. An optional location /video/ { sendfile on; aio on; directio 8m; } 84 parameter allows overriding it:

aio threads=pool$disk; 3
Before version 1.1.9, tuning of caching time was not possible, and nginx always cached answers for the duration of 5 minutes.
To prevent DNS spoofing, it is recommended configuring DNS servers in a properly secured trusted local network.

The optional location /video/ { sendfile on; aio on; directio 8m; } 92 parameter (1.17.1) enables of DNS server statistics of requests and responses in the specified location /video/ { sendfile on; aio on; directio 8m; } 93. The parameter is available as part of our commercial subscription.

Syntax:resolver_timeout options VFS_AIO 11;
Default:aio threads=pool$disk; 4Context:aio off;30, aio off;31, aio off;32

Sets a timeout for name resolution, for example:

aio threads=pool$disk; 5

Syntax:root aio off;53;
Default:aio threads=pool$disk; 6Context:aio off;30, aio off;31, aio off;32, location /video/ { aio on; output_buffers 1 64k; } 56

Sets the root directory for requests. For example, with the following configuration

aio threads=pool$disk; 7

The location /video/ { sendfile on; aio threads; } 11 file will be sent in response to the “aio off;51” request.

The aio off;53 value can contain variables, except aio off;54 and aio off;55.

A path to the file is constructed by merely adding a URI to the value of the location /video/ { sendfile on; aio threads; } 16 directive. If a URI has to be modified, the directive should be used.

Syntax:location /video/ { sendfile on; aio threads; } 17 | location /video/ { sendfile on; aio threads; } 18;
Default:aio threads=pool$disk; 8Context:aio off;30, aio off;31, aio off;32

Allows access if all (location /video/ { sendfile on; aio threads; } 22) or at least one (location /video/ { sendfile on; aio threads; } 18) of the ngx_http_access_module, ngx_http_auth_basic_module, ngx_http_auth_request_module, or ngx_http_auth_jwt_module modules allow access.

Example:

aio threads=pool$disk; 9

Syntax:send_lowat location /video/ { aio on; output_buffers 1 64k; } 07;
Default:aio_write off;0Context:aio off;30, aio off;31, aio off;32

If the directive is set to a non-zero value, nginx will try to minimize the number of send operations on client sockets by using either location /video/ { sendfile on; aio threads; } 28 flag of the method or the location /video/ { sendfile on; aio threads; } 29 socket option. In both cases the specified location /video/ { aio on; output_buffers 1 64k; } 07 is used.

This directive is ignored on Linux, Solaris, and Windows.

Syntax:send_timeout options VFS_AIO 11;
Default:aio_write off;1Context:aio off;30, aio off;31, aio off;32

Sets a timeout for transmitting a response to the client. The timeout is set only between two successive write operations, not for the transmission of the whole response. If the client does not receive anything within this time, the connection is closed.

Syntax:sendfile aio off;78 | aio off;29;
Default:aio_write off;2Context:aio off;30, aio off;31, aio off;32, location /video/ { aio on; output_buffers 1 64k; } 56

Enables or disables the use of location /video/ { sendfile on; aio threads; } 41.

Starting from nginx 0.8.12 and FreeBSD 5.2.1, can be used to pre-load data for location /video/ { sendfile on; aio threads; } 41:

aio_write off;3

In this configuration, location /video/ { sendfile on; aio threads; } 41 is called with the location /video/ { sendfile on; aio threads; } 44 flag which causes it not to block on disk I/O, but, instead, report back that the data are not in memory. nginx then initiates an asynchronous data load by reading one byte. On the first read, the FreeBSD kernel loads the first 128K bytes of a file into memory, although next reads will only load data in 16K chunks. This can be changed using the directive.

Before version 1.7.11, pre-loading could be enabled with location /video/ { sendfile on; aio threads; } 45.

Syntax:sendfile_max_chunk location /video/ { aio on; output_buffers 1 64k; } 07;
Default:aio_write off;4Context:aio off;30, aio off;31, aio off;32

Limits the amount of data that can be transferred in a single location /video/ { sendfile on; aio threads; } 41 call. Without the limit, one fast connection may seize the worker process entirely.

Prior to version 1.21.4, by default there was no limit.

Syntax:location /video/ { sendfile on; aio threads; } 51
Default:—Context:aio off;30

Sets configuration for a virtual server. There is no clear separation between IP-based (based on the IP address) and name-based (based on the “Host” request header field) virtual servers. Instead, the directives describe all addresses and ports that should accept connections for the server, and the directive lists all server names. Example configurations are provided in the “How nginx processes a request” document.

Syntax:server_name location /video/ { aio on; directio 512; output_buffers 1 128k; } 64 ...;
Default:aio_write off;5Context:aio off;31

Sets names of a virtual server, for example:

aio_write off;6

The first name becomes the primary server name.

Server names can include an asterisk (“location /video/ { sendfile on; aio threads; } 55”) replacing the first or last part of a name:

aio_write off;7

Such names are called wildcard names.

The first two of the names mentioned above can be combined in one:

aio_write off;8

It is also possible to use regular expressions in server names, preceding the name with a tilde (“location /video/ { aio on; directio 512; output_buffers 1 128k; } 59”):

aio_write off;9

Regular expressions can contain captures (0.7.40) that can later be used in other directives:

aio off;00

Named captures in regular expressions create variables (0.8.25) that can later be used in other directives:

aio off;01

If the directive’s parameter is set to “location /video/ { sendfile on; aio threads; } 57” (0.9.4), the machine’s hostname is inserted.

It is also possible to specify an empty server name (0.7.11):

aio off;02

It allows this server to process requests without the “Host” header field — instead of the default server — for the given address:port pair. This is the default setting.

Before 0.8.48, the machine’s hostname was used by default.

During searching for a virtual server by name, if the name matches more than one of the specified variants, (e.g. both a wildcard name and regular expression match), the first matching variant will be chosen, in the following order of priority:

  1. the exact name
  2. the longest wildcard name starting with an asterisk, e.g. “location /video/ { sendfile on; aio threads; } 58”
  3. the longest wildcard name ending with an asterisk, e.g. “location /video/ { sendfile on; aio threads; } 59”
  4. the first matching regular expression (in order of appearance in the configuration file)

Detailed description of server names is provided in a separate Server names document.

Syntax:server_name_in_redirect aio off;78 | aio off;29;
Default:aio off;03Context:aio off;30, aio off;31, aio off;32

Enables or disables the use of the primary server name, specified by the directive, in redirects issued by nginx. When the use of the primary server name is disabled, the name from the “Host” request header field is used. If this field is not present, the IP address of the server is used.

The use of a port in redirects is controlled by the directive.

Syntax:server_names_hash_bucket_size location /video/ { aio on; output_buffers 1 64k; } 07;
Default:aio off;04Context:aio off;30

Sets the bucket size for the server names hash tables. The default value depends on the size of the processor’s cache line. The details of setting up hash tables are provided in a separate document.

Syntax:server_names_hash_max_size location /video/ { aio on; output_buffers 1 64k; } 07;
Default:aio off;05Context:aio off;30

Sets the maximum location /video/ { aio on; output_buffers 1 64k; } 07 of the server names hash tables. The details of setting up hash tables are provided in a separate document.

Syntax:server_tokens aio off;78 | aio off;29 | location /video/ { sendfile on; aio threads; } 72 | location /video/ { sendfile on; aio threads; } 73;
Default:aio off;06Context:aio off;30, aio off;31, aio off;32

Enables or disables emitting nginx version on error pages and in the “Server” response header field.

The location /video/ { sendfile on; aio threads; } 72 parameter (1.11.10) enables emitting a along with nginx version.

Additionally, as part of our commercial subscription, starting from version 1.9.13 the signature on error pages and the “Server” response header field value can be set explicitly using the location /video/ { sendfile on; aio threads; } 73 with variables. An empty string disables the emission of the “Server” field.

Syntax:subrequest_output_buffer_size location /video/ { aio on; output_buffers 1 64k; } 07;
Default:aio off;07Context:aio off;30, aio off;31, aio off;32

This directive appeared in version 1.13.10.

Sets the location /video/ { aio on; output_buffers 1 64k; } 07 of the buffer used for storing the response body of a subrequest. By default, the buffer size is equal to one memory page. This is either 4K or 8K, depending on a platform. It can be made smaller, however.

The directive is applicable only for subrequests with response bodies saved into memory. For example, such subrequests are created by .

Syntax:tcp_nodelay aio off;78 | aio off;29;
Default:aio off;08Context:aio off;30, aio off;31, aio off;32

Enables or disables the use of the location /video/ { sendfile on; aio threads; } 89 option. The option is enabled when a connection is transitioned into the keep-alive state. Additionally, it is enabled on SSL connections, for unbuffered proxying, and for WebSocket proxying.

Syntax:tcp_nopush aio off;78 | aio off;29;
Default:aio off;09Context:aio off;30, aio off;31, aio off;32

Enables or disables the use of the location /video/ { sendfile on; aio threads; } 95 socket option on FreeBSD or the location /video/ { sendfile on; aio threads; } 96 socket option on Linux. The options are enabled only when is used. Enabling the option allows

  • sending the response header and the beginning of a file in one packet, on Linux and FreeBSD 4.*;
  • sending a file in full packets.

Syntax:location /video/ { sendfile on; aio threads; } 97 ... location /video/ { aio on; output_buffers 1 64k; } 52;
location /video/ { sendfile on; aio threads; } 97 ... =aio threads=pool$disk; 00;
Default:—Context:aio off;31, aio off;32

Checks the existence of files in the specified order and uses the first found file for request processing; the processing is performed in the current context. The path to a file is constructed from the aio threads=pool$disk; 03 parameter according to the and directives. It is possible to check directory’s existence by specifying a slash at the end of a name, e.g. “aio threads=pool$disk; 04”. If none of the files were found, an internal redirect to the location /video/ { aio on; output_buffers 1 64k; } 52 specified in the last parameter is made. For example:

aio off;10

The last parameter can also point to a named location, as shown in examples below. Starting from version 0.7.51, the last parameter can also be a aio threads=pool$disk; 00:

aio off;11

Example in proxying Mongrel:

aio off;12

Example for Drupal/FastCGI:

aio off;13

In the following example,

aio off;14

the aio threads=pool$disk; 07 directive is equivalent to

aio off;15

And here,

aio off;16

aio threads=pool$disk; 07 checks the existence of the PHP file before passing the request to the FastCGI server.

Example for Wordpress and Joomla:

aio off;17

Syntax:aio threads=pool$disk; 09
Default:aio off;18Context:aio off;30, aio off;31, aio off;32

Maps file name extensions to MIME types of responses. Extensions are case-insensitive. Several extensions can be mapped to one type, for example:

aio off;19

A sufficiently full mapping table is distributed with nginx in the aio threads=pool$disk; 13 file.

To make a particular location emit the “aio threads=pool$disk; 14” MIME type for all requests, the following configuration can be used:

aio off;20

Syntax:types_hash_bucket_size location /video/ { aio on; output_buffers 1 64k; } 07;
Default:aio off;21Context:aio off;30, aio off;31, aio off;32

Sets the bucket size for the types hash tables. The details of setting up hash tables are provided in a separate document.

Prior to version 1.5.13, the default value depended on the size of the processor’s cache line.

Syntax:types_hash_max_size location /video/ { aio on; output_buffers 1 64k; } 07;
Default:aio off;22Context:aio off;30, aio off;31, aio off;32

Sets the maximum location /video/ { aio on; output_buffers 1 64k; } 07 of the types hash tables. The details of setting up hash tables are provided in a separate document.

Syntax:underscores_in_headers aio off;78 | aio off;29;
Default:aio off;23Context:aio off;30, aio off;31

Enables or disables the use of underscores in client request header fields. When the use of underscores is disabled, request header fields whose names contain underscores are marked as invalid and become subject to the directive.

If the directive is specified on the level, the value from the default server can be used. Details are provided in the “” section.

Syntax:variables_hash_bucket_size location /video/ { aio on; output_buffers 1 64k; } 07;
Default:aio off;24Context:aio off;30

Sets the bucket size for the variables hash table. The details of setting up hash tables are provided in a separate document.

Syntax:variables_hash_max_size location /video/ { aio on; output_buffers 1 64k; } 07;
Default:aio off;25Context:aio off;30

Sets the maximum location /video/ { aio on; output_buffers 1 64k; } 07 of the variables hash table. The details of setting up hash tables are provided in a separate document.

Prior to version 1.5.13, the default value was 512.

Embedded Variables

The aio threads=pool$disk; 33 module supports embedded variables with names matching the Apache Server variables. First of all, these are variables representing client request header fields, such as aio threads=pool$disk; 34, aio threads=pool$disk; 35, and so on. Also there are other variables:

aio threads=pool$disk; 36location /video/ { aio on; directio 512; output_buffers 1 128k; } 64argument location /video/ { aio on; directio 512; output_buffers 1 128k; } 64 in the request lineaio threads=pool$disk; 39arguments in the request lineaio threads=pool$disk; 40client address in a binary form, value’s length is always 4 bytes for IPv4 addresses or 16 bytes for IPv6 addressesaio threads=pool$disk; 41number of bytes sent to a client, not counting the response header; this variable is compatible with the “aio threads=pool$disk; 42” parameter of the aio threads=pool$disk; 43 Apache moduleaio threads=pool$disk; 44number of bytes sent to a client (1.3.8, 1.2.5)aio threads=pool$disk; 45connection serial number (1.3.8, 1.2.5)aio threads=pool$disk; 46current number of requests made through a connection (1.3.8, 1.2.5)connection time in seconds with a milliseconds resolution (1.19.10)aio threads=pool$disk; 47“Content-Length” request header fieldaio threads=pool$disk; 48“Content-Type” request header fieldaio threads=pool$disk; 49location /video/ { aio on; directio 512; output_buffers 1 128k; } 64the location /video/ { aio on; directio 512; output_buffers 1 128k; } 64 cookieaio off;54 or directive’s value for the current requestaio threads=pool$disk; 53same as aio threads=pool$disk; 54aio threads=pool$disk; 55in this order of precedence: host name from the request line, or host name from the “Host” request header field, or the server name matching a requestlocation /video/ { sendfile on; aio threads; } 57host nameaio threads=pool$disk; 57location /video/ { aio on; directio 512; output_buffers 1 128k; } 64arbitrary request header field; the last part of a variable name is the field name converted to lower case with dashes replaced by underscoresaio threads=pool$disk; 59“aio off;78” if connection operates in SSL mode, or an empty string otherwiseaio threads=pool$disk; 61“aio threads=pool$disk; 62” if a request line has arguments, or an empty string otherwiseoptions VFS_AIO 44setting this variable enables response rate limiting; see aio threads=pool$disk; 64current time in seconds with the milliseconds resolution (1.3.9, 1.2.6)aio threads=pool$disk; 65nginx versionaio threads=pool$disk; 66PID of the worker processaio threads=pool$disk; 67“aio threads=pool$disk; 68” if request was pipelined, “location /video/ { aio on; directio 512; output_buffers 1 128k; } 68” otherwise (1.3.12, 1.2.7)aio threads=pool$disk; 70client address from the PROXY protocol header (1.5.12)

The PROXY protocol must be previously enabled by setting the options VFS_AIO 73 parameter in the directive.

aio threads=pool$disk; 72client port from the PROXY protocol header (1.11.0)

The PROXY protocol must be previously enabled by setting the options VFS_AIO 73 parameter in the directive.

aio threads=pool$disk; 74server address from the PROXY protocol header (1.17.6)

The PROXY protocol must be previously enabled by setting the options VFS_AIO 73 parameter in the directive.

aio threads=pool$disk; 76server port from the PROXY protocol header (1.17.6)

The PROXY protocol must be previously enabled by setting the options VFS_AIO 73 parameter in the directive.

aio threads=pool$disk; 78location /video/ { aio on; directio 512; output_buffers 1 128k; } 64TLV from the PROXY Protocol header (1.23.2). The aio threads=pool$disk; 80 can be a TLV type name or its numeric value. In the latter case, the value is hexadecimal and should be prefixed with aio threads=pool$disk; 81:
aio off;26
SSL TLVs can also be accessed by TLV type name or its numeric value, both prefixed by aio threads=pool$disk; 82:
aio off;27

The following TLV type names are supported:

  • aio threads=pool$disk; 83 (aio threads=pool$disk; 84) - upper layer protocol used over the connection
  • aio threads=pool$disk; 85 (aio threads=pool$disk; 86) - host name value passed by the client
  • aio threads=pool$disk; 87 (aio threads=pool$disk; 88) - unique connection id
  • aio threads=pool$disk; 89 (aio threads=pool$disk; 90) - name of the namespace
  • options VFS_AIO 70 (aio threads=pool$disk; 92) - binary SSL TLV structure

The following SSL TLV type names are supported:

  • aio threads=pool$disk; 93 (aio threads=pool$disk; 94) - SSL version used in client connection
  • aio threads=pool$disk; 95 (aio threads=pool$disk; 96) - SSL certificate Common Name
  • aio threads=pool$disk; 97 (aio threads=pool$disk; 98) - name of the used cipher
  • aio threads=pool$disk; 99 (aio_write off;00) - algorithm used to sign the certificate
  • aio_write off;01 (aio_write off;02) - public-key algorithm

Also, the following special SSL TLV type name is supported:

  • aio_write off;03 - client SSL certificate verification result, aio_write off;04 if the client presented a certificate and it was successfully verified, non-zero otherwise.

The PROXY protocol must be previously enabled by setting the options VFS_AIO 73 parameter in the directive.

aio_write off;06same as aio threads=pool$disk; 39aio off;55an absolute pathname corresponding to the or directive’s value for the current request, with all symbolic links resolved to real pathsaio_write off;09client addressaio_write off;10client portaio_write off;11user name supplied with the Basic authenticationaio_write off;12full original request lineaio off;85request body

The variable’s value is made available in locations processed by the , , , and directives when the request body was read to a .

aio off;77name of a temporary file with the request body

At the end of processing, the file needs to be removed. To always write the request body to a file, needs to be enabled. When the name of a temporary file is passed in a proxied request or in a request to a FastCGI/uwsgi/SCGI server, passing the request body should be disabled by the , , , or directives, respectively.

aio_write off;15“aio_write off;16” if a request has completed, or an empty string otherwiseaio_write off;17file path for the current request, based on the or directives, and the request URIaio_write off;18unique request identifier generated from 16 random bytes, in hexadecimal (1.11.0)aio_write off;19request length (including request line, header, and request body) (1.3.12, 1.2.7)aio_write off;20request method, usually “location /video/ { aio on; output_buffers 1 64k; } 59” or “options VFS_AIO 24”request processing time in seconds with a milliseconds resolution (1.3.9, 1.2.6); time elapsed since the first bytes were read from the clientaio_write off;23full original request URI (with arguments)aio_write off;24request scheme, “aio off;30” or “aio_write off;26”aio_write off;27location /video/ { aio on; directio 512; output_buffers 1 128k; } 64arbitrary response header field; the last part of a variable name is the field name converted to lower case with dashes replaced by underscoresaio_write off;29location /video/ { aio on; directio 512; output_buffers 1 128k; } 64arbitrary field sent at the end of the response (1.13.2); the last part of a variable name is the field name converted to lower case with dashes replaced by underscoresaio_write off;31an address of the server which accepted a request

Computing a value of this variable usually requires one system call. To avoid a system call, the directives must specify addresses and use the options VFS_AIO 87 parameter.

aio_write off;33name of the server which accepted a requestaio_write off;34port of the server which accepted a requestaio_write off;35request protocol, usually “aio_write off;36”, “aio_write off;37”, or “HTTP/2.0”aio_write off;38response status (1.3.2, 1.2.2)aio_write off;39, aio_write off;40, aio_write off;41, aio_write off;42information about the client TCP connection; available on systems that support the aio_write off;43 socket optionlocal time in the ISO 8601 standard format (1.3.12, 1.2.7)local time in the Common Log Format (1.3.12, 1.2.7)aio threads=pool$disk; 54current URI in request,

The value of aio threads=pool$disk; 54 may change during request processing, e.g. when doing internal redirects, or when using index files.

What is the term used for the variable that receives the argument being passed into a method?

A parameter is a named variable passed into a function. Parameter variables are used to import arguments into functions.

What is a variable that receives an argument?

A parameter variable is a variable local to the function which receives the argument. That is to say, the argument's value is copied into the parameter variable.

Which variable receives an argument that is passed to a module?

parameter; is a variable that receives an argument that is passed into a module. When two parameter variables are declared inside the parentheses in the module header. Only a copy of the argument's value is passed into the parameter variable.

What are the variables that receive pieces of data in a module called?

A local variable is a variable that is declared inside a module. It belongs to the module in which it is declared, and only statements inside the same module can access it.

Toplist

Neuester Beitrag

Stichworte