session_log_format

Syntax: session_log_format name string ...; Default: session_log_format combined "..."; Context: http Specifies the output format of a log. The value of the $body_bytes_sent variable is aggregated across all requests in a session. The values of all other variables available for logging correspond to the first request in a session.

session_log

Syntax: session_log name | off; Default: session_log off; Context: http, server, location Enables the use of the specified session log. The special value off cancels all session_log directives inherited from the previous configuration level.

server_tokens

Syntax: server_tokens on | off | string; Default: server_tokens on; Context: http, server, location Enables or disables emitting nginx version in error messages and in the “Server” response header field. Additionally, as part of our commercial subscription, starting from version 1.9.13 the signature in error messages and the “Server” response header field value can be set explicitly using the string with variables. An empty string disables the emission of the “Server

server_name_in_redirect

Syntax: server_name_in_redirect on | off; Default: server_name_in_redirect off; Context: http, server, location Enables or disables the use of the primary server name, specified by the server_name directive, in absolute 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 port_in_r

server_names_hash_max_size

Syntax: server_names_hash_max_size size; Default: server_names_hash_max_size 512; Context: http Sets the maximum size of the server names hash tables. The details of setting up hash tables are provided in a separate document.

server_names_hash_bucket_size

Syntax: server_names_hash_bucket_size size; Default: server_names_hash_bucket_size 32|64|128; Context: http 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.

server_name

Syntax: server_name name; Default: server_name hostname; Context: mail, server Sets the server name that is used: in the initial POP3/SMTP server greeting; in the salt during the SASL CRAM-MD5 authentication; in the EHLO command when connecting to the SMTP backend, if the passing of the XCLIENT command is enabled. If the directive is not specified, the machine’s hostname is used.

server_name

Syntax: server_name name ...; Default: server_name ""; Context: server Sets names of a virtual server, for example: server { server_name example.com www.example.com; } The first name becomes the primary server name. Server names can include an asterisk (“*”) replacing the first or last part of a name: server { server_name example.com *.example.com www.example.*; } Such names are called wildcard names. The first two of the names mentioned above can be combined in

Server names

Server names Wildcard names Regular expressions names Miscellaneous names Optimization Compatibility Server names are defined using the server_name directive and determine which server block is used for a given request. See also “How nginx processes a request”. They may be defined using exact names, wildcard names, or regular expressions: server { listen 80; server_name example.org www.example.org; ... } server { listen 80; server_name *.example.org;

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 obligatory port, or as a UNIX-domain socket path specified after the “unix:” prefix. 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 the server, by default, 1. max_conns=number