Error: 413 Request Entity Too Large

? Error: 413 Request Entity Too Large

Overview

The “413 Request Entity Too Large” error occurs when a client (such as a browser or API client) attempts to upload a file that exceeds the server’s configured size limits. This is commonly encountered during file uploads in WHMCS, such as importing database backups, uploading attachments, or updating modules.

Cause

This error is typically triggered by server-side limitations set in the web server configuration (e.g., NGINX or Apache) or PHP settings that restrict the maximum allowed request size.

Resolution Steps

For NGINX Users

  1. Edit the NGINX Configuration File
    Open your NGINX configuration file, usually located at:
    /etc/nginx/nginx.conf
    Or for site-specific settings:
    /etc/nginx/sites-available/yourdomain.conf
  2. Increase the client_max_body_size
    Add or modify the following directive inside the http, server, or location block:
    client_max_body_size 20M;
    Adjust 20M to the desired maximum upload size.
  3. Restart NGINX
    sudo systemctl restart nginx

For Apache Users

  1. Edit the .htaccess File
    Add the following lines:
    php_value upload_max_filesize 20M
    php_value post_max_size 25M
  2. Or Edit php.ini (if accessible)
    Locate and modify:
    upload_max_filesize = 20M
    post_max_size = 25M
  3. Restart Apache
    sudo systemctl restart apache2

For WHM/cPanel Users

  1. Login to WHM
  2. Navigate to: Home » Software » MultiPHP INI Editor
  3. Select your domain and adjust:
    • upload_max_filesize
    • post_max_size
  4. Save changes and restart Apache if necessary.

Test the Fix

After applying the changes, try uploading the file again in WHMCS. If the issue persists, double-check the configuration and ensure the web server has been restarted.

Additional Tips

  • Always back up configuration files before making changes.
  • Ensure your PHP version supports the configured limits.
  • Consider setting slightly higher limits than needed to avoid future issues.

If you continue to experience issues, please contact your hosting provider or server administrator for further assistance.

  • 413 Request Entity Too Large, upload_max_filesize, webserver, nginx, apache2
  • 0 Korisnici koji smatraju članak korisnim
Je li Vam ovaj odgovor pomogao?

Vezani članci

how can I make sure the security is hardened for my Linux Server?

Security hardening is an important part of maintaining a secure Linux operating system. Here are...

How can i enable SSH to my linux host using ssh key?

Enabling SSH with key authentication involves generating an SSH key pair and configuring your SSH...

How to install and configure Firewalld in linux?

Firewalld is a firewall management tool that comes pre-installed on many Linux distributions....

How to install Ioncube loader on CentOS, Debian and Ubuntu

  Introduction Using ionCube encoded and secured PHP files requires a file called the...

How to enable Root account within Ubuntu Server

Software Requirements and Conventions Used Software Requirements and Linux Command Line...