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

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • 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. How to Change Password Of An LXC Container User Account
  2. How to Remove a Dead Mulitpath Device without Reboot in CentOS/RHEL
  3. The /var/log/messages is empty, and so are the rotated log files such as messages.0, messages.1
  4. How to Configure Logical Volume Manager for Cluster File System
  5. Linux OS Service ‘avahi-daemon’
  6. CentOS / RHEL 7 : How to configure Network Bonding or NIC teaming
  7. RHEL 7 – RHCSA Notes (Cheat Sheets)
  8. CentOS / RHEL : How to configure vsftpd to use ports other than the default ports 20 and 21
  9. How to rename a KVM VM with virsh
  10. Cannot Increase “nproc” Value More Than 1024 in CentOS/RHEL 6

You May Also Like

Primary Sidebar

Recent Posts

  • How to disable ACPI in CentOS/RHEL 7
  • How to Use real-time query to access data on a physical standby database
  • CentOS/RHEL 8: “ACPI MEMORY OR I/O RESET_REG” Server Hung after reboot
  • How to Create a Physical Standby Database by Using SQL and RMAN Commands
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary