upstream_conf

Syntax: upstream_conf; Default: — Context: location Turns on the HTTP interface of upstream configuration in the surrounding location. Access to this location should be limited. Configuration commands can be used to: view the group configuration; view, modify, or remove a server; add a new server. Since addresses in a group are not required to be unique, specific servers in a group are referenced by their IDs. IDs are assigned automatically and shown when adding a new server

use

Syntax: use method; Default: — Context: events Specifies the connection processing method to use. There is normally no need to specify it explicitly, because nginx will by default use the most efficient method.

upstream

Syntax: upstream name { ... } Default: — Context: stream Defines a group of servers. Servers can listen on different ports. In addition, servers listening on TCP and UNIX-domain sockets can be mixed. Example: upstream backend { server backend1.example.com:12345 weight=5; server 127.0.0.1:12345 max_fails=3 fail_timeout=30s; server unix:/tmp/backend2; server backend3.example.com:12345 resolve; server backup1.example.com:12345 backup; } By defaul

underscores_in_headers

Syntax: underscores_in_headers on | off; Default: underscores_in_headers off; Context: http, server 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 ignore_invalid_headers directive. If the directive is specified on the server level, its value is only used if a server is a default one. The value specified also ap

uninitialized_variable_warn

Syntax: uninitialized_variable_warn on | off; Default: uninitialized_variable_warn on; Context: http, server, location, if Controls whether warnings about uninitialized variables are logged.

upstream

Syntax: upstream name { ... } Default: — Context: http Defines a group of servers. Servers can listen on different ports. In addition, servers listening on TCP and UNIX-domain sockets can be mixed. Example: upstream backend { server backend1.example.com weight=5; server 127.0.0.1:8080 max_fails=3 fail_timeout=30s; server unix:/tmp/backend3; server backup1.example.com backup; } By default, requests are distributed between the servers using a weighted ro

types_hash_max_size

Syntax: types_hash_max_size size; Default: types_hash_max_size 1024; Context: http, server, location Sets the maximum size of the types hash tables. The details of setting up hash tables are provided in a separate document.

types_hash_bucket_size

Syntax: types_hash_bucket_size size; Default: types_hash_bucket_size 64; Context: http, server, location 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.

types

Syntax: types { ... } Default: types { text/html html; image/gif gif; image/jpeg jpg; } Context: http, server, location Maps file name extensions to MIME types of responses. Extensions are case-insensitive. Several extensions can be mapped to one type, for example: types { application/octet-stream bin exe dll; application/octet-stream deb; application/octet-stream dmg; } A sufficiently full mapping table is distributed with nginx in the conf/mime.types

try_files

Syntax: try_files file ... uri;try_files file ... =code; Default: — Context: server, location 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 file parameter according to the root and alias directives. It is possible to check directory’s existence by specifying a slash at the end of a name, e.g. “$uri/”. If none of the files were f