• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

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