• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Resolved Plesk Obsidian Version 18.0.56 Update #4 on Ubuntu 22.04.3 LTS ModSecurity upload error on WordPress

copec

New Pleskian
Server operating system version
Ubuntu 22.04.3 LTS
Plesk version and microupdate number
Plesk Obsidian Version 18.0.56 Update #4
I'm getting an error:
Code:
ModSecurity: Request body (Content-Length) is larger than the configured limit (134217728)
when a customer tries to upload a file larger than that respective limit in the WordPress control panel.

This customer wants to upload short videos in their WordPress instance, and needs a 1GB limit, so that's the limit I've targeted in setting nginx client_max_body_size, apache2 FcgidMaxRequestLen under /opt/psa/admin/conf/templates/default/ as well as LimitRequestBody and SecResponseBodyLimit; I've also set the limits in PHP. I've regenerated all the configs and even recursively grep'd the entire server for 134217728, but I don't know where it is coming from.

I have applied the following and had a second set of eyes check it out for me too:

Anybody know where this limit is coming from?
 
Okay, I knew posting a question would make me look at something and figure it out!

You want to set SecRequestBodyLimit for uploads, not SecResponseBodyLimit

I'll put this here for posterity:
Apache config:
LimitRequestBody 1073741824
<IfModule mod_security2.c>
    SecResponseBodyLimit 1073741824
    SecRequestBodyLimit 1073741824
</IfModule>
 

Attachments

  • Screenshot 2023-12-07 at 3.04.48 PM.png
    Screenshot 2023-12-07 at 3.04.48 PM.png
    146.9 KB · Views: 4
Back
Top