if

Syntax: if (condition) { ... } Default: — Context: server, location The specified condition is evaluated. If true, this module directives specified inside the braces are executed, and the request is assigned the configuration inside the if directive. Configurations inside the if directives are inherited from the previous configuration level. A condition may be any of the following: a variable name; false if the value of a variable is an empty string or “0”; Before version 1.0.

http2_recv_timeout

Syntax: http2_recv_timeout time; Default: http2_recv_timeout 30s; Context: http, server Sets the timeout for expecting more data from the client, after which the connection is closed.

http2_recv_buffer_size

Syntax: http2_recv_buffer_size size; Default: http2_recv_buffer_size 256k; Context: http Sets the size of the per worker input buffer.

http2_max_requests

Syntax: http2_max_requests number; Default: http2_max_requests 1000; Context: http, server, location This directive appeared in version 1.11.6. Sets the maximum number of requests that can be served through one HTTP/2 connection, after which the connection is closed and the client should use a new connection.

http2_max_header_size

Syntax: http2_max_header_size size; Default: http2_max_header_size 16k; Context: http, server Limits the maximum size of the entire request header list after HPACK decompression. For most requests, the default limit should be enough.

http2_max_field_size

Syntax: http2_max_field_size size; Default: http2_max_field_size 4k; Context: http, server Limits the maximum size of an HPACK-compressed request header field. The limit applies equally to both name and value. Note that if Huffman encoding is applied, the actual size of decompressed name and value strings may be larger. For most requests, the default limit should be enough.

http2_max_concurrent_streams

Syntax: http2_max_concurrent_streams number; Default: http2_max_concurrent_streams 128; Context: http, server Sets the maximum number of concurrent HTTP/2 streams in a connection.

http2_idle_timeout

Syntax: http2_idle_timeout time; Default: http2_idle_timeout 3m; Context: http, server Sets the timeout of inactivity after which the connection is closed.

http2_chunk_size

Syntax: http2_chunk_size size; Default: http2_chunk_size 8k; Context: http, server, location Sets the maximum size of chunks into which the response body is sliced. A too low value results in higher overhead. A too high value impairs prioritization due to HOL blocking.

http2_body_preread_size

Syntax: http2_body_preread_size size; Default: http2_body_preread_size 64k; Context: http, server This directive appeared in version 1.11.0. Sets the size of the buffer per each request in which the request body may be saved before it is started to be processed.