The LimitRequestBody directive allows the user to set a limit on size of the request. If the client request exceeds that limit, the server will return an error response instead of servicing the request.

The value of LimitRequestBody can be between 0 bytes (meaning unlimited) to 2147483647 (2GB).

For example,if we want to limit upload size to 100k for /srv/www/htdocs/uploads, we need to add below commands to .htaccess or httpd.conf.