aio

Syntax: aio on | off | threads[=pool]; Default: aio off; Context: http, server, location This directive appeared in version 0.8.11. Enables or disables the use of asynchronous file I/O (AIO) on FreeBSD and Linux: location /video/ { aio on; output_buffers 1 64k; } 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 lo

image_filter_transparency

Syntax: image_filter_transparency on|off; Default: image_filter_transparency on; Context: http, server, location Defines whether transparency should be preserved when transforming GIF images or PNG images with colors specified by a palette. The loss of transparency results in images of a better quality. The alpha channel transparency in PNG is always preserved.

proxy_set_header

Syntax: proxy_set_header field value; Default: proxy_set_header Host $proxy_host;proxy_set_header Connection close; Context: http, server, location Allows redefining or appending fields to the request header passed to the proxied server. The value can contain text, variables, and their combinations. These directives are inherited from the previous level if and only if there are no proxy_set_header directives defined on the current level. By default, only two fields are redefined:

geo

Syntax: geo [$address] $variable { ... } Default: — Context: stream Describes the dependency of values of the specified variable on the client IP address. By default, the address is taken from the $remote_addr variable, but it can also be taken from another variable, for example: geo $arg_remote_addr $geo { ...; } Since variables are evaluated only when used, the mere existence of even a large number of declared “geo” variables does not cause any extra costs for connection

env

Syntax: env variable[=value]; Default: env TZ; Context: main By default, nginx removes all environment variables inherited from its parent process except the TZ variable. This directive allows preserving some of the inherited variables, changing their values, or creating new environment variables. These variables are then: inherited during a live upgrade of an executable file; used by the ngx_http_perl_module module; used by worker processes. One should bear in mind that cont

proxy_cache_lock_timeout

Syntax: proxy_cache_lock_timeout time; Default: proxy_cache_lock_timeout 5s; Context: http, server, location This directive appeared in version 1.1.12. Sets a timeout for proxy_cache_lock. When the time expires, the request will be passed to the proxied server, however, the response will not be cached. Before 1.7.8, the response could be cached.

autoindex

Syntax: autoindex on | off; Default: autoindex off; Context: http, server, location Enables or disables the directory listing output.

referer_hash_max_size

Syntax: referer_hash_max_size size; Default: referer_hash_max_size 2048; Context: server, location This directive appeared in version 1.0.5. Sets the maximum size of the valid referers hash tables. The details of setting up hash tables are provided in a separate document.

if_modified_since

Syntax: if_modified_since off | exact | before; Default: if_modified_since exact; Context: http, server, location 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: off the “If-Modified-Since” request header field is ignored (0.7.34); exact exact match; before modification time of a response is less than or equal to the time in the “If-Modified-Since”

Setting up hashes

Setting up hashes To quickly process static sets of data such as server names, map directive’s values, MIME types, names of request header strings, nginx uses hash tables. During the start and each re-configuration nginx selects the minimum possible sizes of hash tables such that the bucket size that stores keys with identical hash values does not exceed the configured parameter (hash bucket size). The size of a table is expressed in buckets. The adjustment is continued until the table size ex