• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to Increase the File Download Size Limit in Apache

by admin

The Problem

You may encounter a request to increase the file download size limit in Apache server.

Attempting to call a URL to upload a file, the following error occurs in Browser:

ERROR
Request entity too large. Request exceeds the capacity limit

Apache error_log has the following error:

Request content-length of 294135 is larger than the configured limit of 262144

The Solution

The file download size limit is controlled by the Apache directive “LimitRequestBody“.

By default, it is not set, which means unlimited or virtually no limit in the POST requests. If the directive is set to a specific size, then exceeding that size will produce an error similar to the one above.

For a more detailed description of this directive, see the following Apache documentation:
http://httpd.apache.org/docs/1.3/mod/core.html#limitrequestbody

To modify this setting:

1. Edit the httpd.conf file and set the directive to the desired value. For example, to set the value for 5MB you would use something like this:

LimitRequestBody 5120000

Or:

2. Edit the httpd.conf file and remove or comment out the directive:

#LimitRequestBody 262144

Filed Under: Apache, Linux

Some more articles you might also be interested in …

  1. timedatectl: command not found
  2. awslogs Command Examples (Queries groups, streams and events from Amazon CloudWatch logs)
  3. kscreen-doctor Command Examples in Linux
  4. How to enable md5 Hashing in Linux
  5. from: Prints mail header lines from the current user’s mailbox
  6. CentOS / RHEL : How to get the date and time of executed command in the history command output
  7. which: command not found
  8. atop Command Examples in Linux
  9. Basic “ls” Command examples in Linux
  10. “az pipelines” Command Examples (Manage Azure Pipelines resources)

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright