Score:0

ModSecurity : PCRE limit settings do not have any effects

jp flag

I'm facing Rule execution error - PCRE limits exceeded (-8): (null). errors when I ask ModSecurity to analyse body data (using the SecRequestBodyAccess On directive).

I've read about the problem, and I tried to increase the limit, both on Apache2 and php-fpm :

/etc/apache2/apache2.conf

SecPcreMatchLimit 5000000
SecPcreMatchLimitRecursion 5000000

/etc/php/8.0/fpm/php.ini

[Pcre]
pcre.backtrack_limit = 1000000000
pcre.recursion_limit = 1000000000

I restarted both Apache2 and PHP-FPM services using systemctl, and I still hit the PCRE limits exceeded. The two configurations seems to not be loaded.

How can I make sure the configuration is loaded ?

Score:0
jp flag

In my case, the configuration was written in the /etc/apache2/apache2.conf instead of /etc/modsecurity.conf

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.