HTTP directives

client_max_body_size directive (HTTP)

In http, server or location. Default 1m. Requests above the configured body limit receive 413. Zero removes the size check; retain a bounded limit appropriate to the application.

Formal Syntax & Structure

nginx syntaxnginx
client_max_body_size size;

Parameters & Attributes

NameTypeDescription
sizesizeMaximum body size, using Nginx size notation.

Working Example

Example Snippetnginx
client_max_body_size 16k;
Nginx Reference