server

Syntax: server address [parameters]; Default: — Context: upstream Defines the address and other parameters of a server. The address can be specified as a domain name or IP address, with an optional port, or as a UNIX-domain socket path specified after the “unix:” prefix. If a port is not specified, the port 80 is used. A domain name that resolves to several IP addresses defines multiple servers at once. The following parameters can be defined: weight=number sets the weight of

server

Syntax: server { ... } Default: — Context: mail Sets the configuration for a server.

server

Syntax: server { ... } Default: — Context: stream Sets the configuration for a server.

server

Syntax: server { ... } Default: — Context: http 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 listen directives describe all addresses and ports that should accept connections for the server, and the server_name directive lists all server names. Example configurations are provided in the “How nginx processes a request” document.

send_timeout

Syntax: send_timeout time; Default: send_timeout 60s; Context: http, server, location 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.

sendfile_max_chunk

Syntax: sendfile_max_chunk size; Default: sendfile_max_chunk 0; Context: http, server, location When set to a non-zero value, limits the amount of data that can be transferred in a single sendfile() call. Without the limit, one fast connection may seize the worker process entirely.

send_lowat

Syntax: send_lowat size; Default: send_lowat 0; Context: http, server, location 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 NOTE_LOWAT flag of the kqueue method or the SO_SNDLOWAT socket option. In both cases the specified size is used. This directive is ignored on Linux, Solaris, and Windows.

sendfile

Syntax: sendfile on | off; Default: sendfile off; Context: http, server, location, if in location Enables or disables the use of sendfile(). Starting from nginx 0.8.12 and FreeBSD 5.2.1, aio can be used to pre-load data for sendfile(): location /video/ { sendfile on; tcp_nopush on; aio on; } In this configuration, sendfile() is called with the SF_NODISKIO flag which causes it not to block on disk I/O, but, instead, report back that the data ar

secure_link_secret

Syntax: secure_link_secret word; Default: — Context: location Defines a secret word used to check authenticity of requested links. The full URI of a requested link looks as follows: /prefix/hash/link where hash is a hexadecimal representation of the MD5 hash computed for the concatenation of the link and secret word, and prefix is an arbitrary string without slashes. If the requested link passes the authenticity check, the $secure_link variable is set to the link extracted

secure_link_md5

Syntax: secure_link_md5 expression; Default: — Context: http, server, location Defines an expression for which the MD5 hash value will be computed and compared with the value passed in a request. The expression should contain the secured part of a link (resource) and a secret ingredient. If the link has a limited lifetime, the expression should also contain $secure_link_expires. To prevent unauthorized access, the expression may contain some information about the client, such a