HTTP directives

max_headers directive (HTTP)

Set request header-line count ceiling; distinct from bytes per header field. Limit violations produce HTTP 400. Context: http, server. Documented default: 1000. Version: 1.29.8. OSS documentation; check target build. Example is a partial http configuration fragment; use a disposable lab, not a production tuning prescription.

Formal Syntax & Structure

nginx syntaxnginx
max_headers number;

Parameters & Attributes

NameTypeDescription
numberintegerValue for max headers.

Working Example

Example Snippetnginx
max_headers 128;
Nginx Reference