Skip to content
  • Contact us: +34 944 58 06 58
  • Plesk Partner Program
  • Plesk Lifecycle Policy
  • Blog
  • Contact us
  • Plesk 360
  • Contact us: +34 944 58 06 58
  • Plesk Partner Program
  • Plesk Lifecycle Policy
  • Blog
  • Contact us
  • Plesk 360
  • Solutions
    By Role
    • Developers
    • Content Managers
    • Digital Agencies
    • IT Admins
    • Web Hosters
    • Hyperscalers
    • Developers
    • Content Managers
    • Digital Agencies
    • IT Admins
    • Web Hosters
    • Hyperscalers
    By Edition
    • Web Admin Edition
    • Web Pro Edition
    • Web Host Edition
    • Business & Collaboration
    • Plesk WP Edition
    • Web Admin Edition
    • Web Pro Edition
    • Web Host Edition
    • Business & Collaboration
    • Plesk WP Edition
    By Cloud
    • Amazon Web Services
    • Microsoft Azure
    • Alibaba Cloud
    • GCP Marketplace
    • Vultr
    • DigitalOcean
    • Linode
    • UpCloud
    • Amazon Web Services
    • Microsoft Azure
    • Alibaba Cloud
    • GCP Marketplace
    • Vultr
    • DigitalOcean
    • Linode
    • UpCloud
    Partner Program
    Exclusive discounts, benefits and exposure to take your business to the next level
    Become a partner
    • By Role
      • Developers
      • Content Managers
      • Digital Agencies
      • IT Admins
      • Web Hosters
      • Hyperscalers
    • By Edition
      • Web Admin Edition
      • Web Pro Edition
      • Web Host Edition
      • Business & Collaboration
      • WP Edition
    • By Cloud
      • Amazon Web Services
      • Microsoft Azure
      • Alibaba Cloud
      • GCP Marketplace
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
    • Partner Program
      • Partner Program
  • Product
    Explore Features
    • Everyone
    • Admins & Web Hosters
    • Developers
    • Designers & Agencies
    • Plesk Features
    • Everyone
    • Admins & Web Hosters
    • Developers
    • Designers & Agencies
    • Plesk Features
    Key Topics
    • SocialBee
    • WP Toolkit
    • Sitejet Builder
    • SEO Toolkit
    • Joomla! Toolkit
    • Plesk Premium Email
    • Plesk Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder
    • SEO Toolkit
    • Joomla! Toolkit
    • Plesk Premium Email
    • Plesk Email Security
    Feature Packs
    • Business & Collaboration
    • WP Pack
    • Hosting Pack
    • Power Pack
    • Language Pack
    • Business & Collaboration
    • WP Pack
    • Hosting Pack
    • Power Pack
    • Language Pack
    Featured Extension
    SocialBee
    • Explore Features
      • Everyone
      • Admins & Web Hosters
      • Developers
      • Designers & Agencies
      • Plesk Features
    • Key Topics
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Plesk Premium Email
      • Plesk Email Security
    • Feature Packs
      • Business & Collaboration
      • WP Pack
      • Hosting Pack
      • Power Pack
      • Language Pack
    • Featured Extension
      • Extension
  • Pricing
  • Extensions
  • Help Center
  • More
    • Careers
    • Events
    • Plesk University
  • FREE TRIAL
  • Solutions
    • By Role
      • Developers
      • Content Managers
      • Digital Agencies
      • IT Admins
      • Web Hosters
      • Hyperscalers
    • By Edition
      • Web Admin Edition
      • Web Pro Edition
      • Web Host Edition
      • Business & Collaboration
      • WP Edition
    • By Cloud
      • Amazon Web Services
      • Microsoft Azure
      • Alibaba Cloud
      • GCP Marketplace
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
    • Partner Program
      • Partner Program
  • Product
    • Explore Features
      • Everyone
      • Admins & Web Hosters
      • Developers
      • Designers & Agencies
      • Plesk Features
    • Key Topics
      • SocialBee
      • WP Toolkit
      • Sitejet Builder
      • SEO Toolkit
      • Joomla! Toolkit
      • Plesk Premium Email
      • Plesk Email Security
    • Feature Packs
      • Business & Collaboration
      • WP Pack
      • Hosting Pack
      • Power Pack
      • Language Pack
    • Featured Extension
      • SocialBee
  • Pricing
  • Extensions
  • Help center
  • More
    • Careers
    • Events
    • Plesk University
    • Blog
    • Plesk Partner Program
    • Contact Us
  • FREE TRIAL
  • Solutions
    • By Role
      • Developers
      • Content Managers
      • Digital Agencies
      • IT Admins
      • Web Hosters
      • Hyperscalers
    • By Edition
      • Web Admin Edition
      • Web Pro Edition
      • Web Host Edition
      • Business & Collaboration
      • WP Edition
    • By Cloud
      • Amazon Web Services
      • Microsoft Azure
      • Alibaba Cloud
      • GCP Marketplace
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
    • Partner Program
      • Partner Program
  • Product
    • Explore Features
      • Everyone
      • Admins & Web Hosters
      • Developers
      • Designers & Agencies
      • Plesk Features
    • Key Topics
      • SocialBee
      • WP Toolkit
      • Sitejet Builder
      • SEO Toolkit
      • Joomla! Toolkit
      • Plesk Premium Email
      • Plesk Email Security
    • Feature Packs
      • Business & Collaboration
      • WP Pack
      • Hosting Pack
      • Power Pack
      • Language Pack
    • Featured Extension
      • SocialBee
  • Pricing
  • Extensions
  • Help center
  • More
    • Careers
    • Events
    • Plesk University
    • Blog
    • Plesk Partner Program
    • Contact Us
  • FREE TRIAL

Knowledge Base

Unable to upload file to the website hosted in Plesk when Imunify is present on the server: Request body no files data length is larger than the configured limit

 
apachecentoscloudlinuxdebiandomains

Symptoms

  • Unable to upload a file to a website hosted in Plesk with the following error:

    413 Request entity too large

    Request Entity Too Large
    The requested resource
    /upload-a-file/
    does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit.

  • On uploading a big file via WordPress administrator interface, the following error is shown:

    Unexpected response from the server. The file may have been uploaded successfully. Check in the Media Library or reload the page

  • ModSecurity component is installed and active on the server

  • Imunify360 is installed and active on the server
  • An error that is similar to the following can be found in the Apache error log /var/www/vhosts/example.com/logs/error_log:

    ModSecurity: Request body no files data length is larger than the configured limit (1048576).. Deny with code (413) [hostname "example.com"] [uri "/Backoffice/index.php"] [unique_id "YCK6aBTMZUZFIMPlEoLhpAAAABk"]

    2023-01-22 13:40:52 Error 203.0.113.2 [client 203.0.113.2] ModSecurity: Request body (Content-Length) is larger than the configured limit (134217728). [hostname "example.com"] [uri "/wp-admin/async-upload.php"] [unique_id "ZbEVgLPF684lP2xTCxMAEwAAABg"], referer: https://example.com/wp-admin/media-new.php Apache error

Cause

The error is caused by the limit of the SecRequestBodyNoFilesLimit within the Imunify360 ruleset for ModSecurity being reached, which makes ModSecurity deny the upload action.

Resolution

Proceed to increase the resource necessary ModSecurity limits as follows:

Click on a section to expand

Globally on the server

  1. Log in to the server via SSH.

  2. Create the file zz_modsec2.conf:

    • On CentOS/RHEL/CloudLinux:

      /etc/httpd/conf.d/zz_modsec2.conf

    • On Debian and Ubuntu:

      /etc/apache2/conf.d/zz_modsec2.conf

    and set the following in it with a text editor:

    <IfModule mod_security2.c>
    SecRequestBodyLimit 546870912
    SecRequestBodyNoFilesLimit 546870912
    </IfModule>

    Note:  The Limit below is specified in Bytes and equals 512 Megabytes.

  3.  Restart Apache server:
  • On CentOS/RHEL/CloudLinux:

    # systemctl restart httpd

  • On Debian and Ubuntu:

    # systemctl restart apache2

By specific domain

  1. Log in to Plesk

  2. Go to Domains > example.com > Apache & Nginx Settings and set the following in both the Additional directives for HTTP and Additional directives for HTTPS fields:

    Note: The Limit below is specified in Bytes and equals 512 Megabytes.

    <IfModule mod_security2.c>
    SecRequestBodyLimit 546870912
    SecRequestBodyNoFilesLimit 546870912
    </IfModule>

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

Your Complete .htaccess Guide: Including .htaccess Basics and More

Read More »

NGINX vs Apache – Which Is the Best Web Server in 2024?

Read More »

Top Web Servers For Linux And Windows

Read More »
Knowledge Base

Websites on Plesk server are slow or show error 500 or PHP mail cannot be sent: ap_pass_brigade failed

Read More »

Website on Plesk server is not accessible: 504 Gateway Time-out: The timeout specified has expired: [client 203.0.113.2:54693] AH01075: Error dispatching request to

Read More »

Unable to upload large files to website hosted on Plesk for Linux server: End of script output before headers

Read More »

All websites hosted in Plesk are not accessible over HTTPS: 502 Bad Gateway or ERR_CONNECTION_REFUSED

Read More »

Hosting Wiki

  • Django
  • DBMS Interface
  • Server Redundancy
  • Google Cloud CDN
  • Bare Metal Server
  • PhpMyAdmin
  • phpPgAdmin
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • PHP
  • MongoDB
  • HTTP/3
  • HTTP/2
  • Domain
  • WordPress
  • Plesk
  • Lighttpd
  • Apache Tomcat
  • NGINX
  • Apache
  • Web Server
  • DNS Server
  • SSH
  • HTTP

Industry
Partners

industry-partner_ALIBABA
industry-partner_GOOGLEPARTNER
industry-partner_MICROSOFT
industry-partner_REDHAT-r2
industry-partner_ALIBABA
industry-partner_AUTOMATTIC
industry-partner_AWS
industry-partner_DIGITALOCEAN
industry-partner_SCALEWAY
Follow us:
Facebook Twitter Linkedin Youtube Github

COMPANY

About Plesk
Our Brand
Legal
Careers
Impressum

PRODUCT

Pricing 
Extensions
What’s new

KNOWLEDGE BASE

Documentation
Help Center
Migrate to Plesk
Contact Us
Hosting Wiki
Preview releases

PROGRAMS

Contributor Program NEW
Partner Program
Affiliate ProgramNEW

COMMUNITY

Blog
Forums 
Plesk University

First defaul

Company

About Plesk
Our Brand
Legal
Careers
Impressum

PRODUCT

Pricing 
Extensions
What’s new

KNOWLEDGE BASE​

Documentation
Help Center
Migrate to Plesk
Contact Us
Hosting Wiki
Preview releases

PROGRAMS​

Contributor Program NEW
Partner Program
Affiliate ProgramNEW

COMMUNITY​

Blog
Forums
Plesk University

Follow us:
Facebook Twitter Linkedin Youtube Github

© 2025 WebPros International GmbH. All rights reserved. Plesk and the Plesk logo are trademarks of WebPros International GmbH.

Managed with love with Plesk WP Toolkit