How to disable mod_security2 on Apache Server


If you are getting trouble to upload PDF file which size is larger then 10 MB  on WordPress you should check your  Apache server  mod_security  configurations. I added some steps about how to disable  mod_security for  Apache  Web  Server.

Step 1: Check mod_security  File

#cat /etc/httpd/conf.d/mod_security.conf|egrep  'SecRuleEngine|SecRequestBodyAccess'

"SecRequestBodyAccess"  and "SecRuleEngine" must be  "On"  if  you have  enabled mod_security  functions.

Step 2: Disable mod_security

SecRuleEngine

SecRequestBodyAccess

Find  these two  parameters and  change  them to  "Off"

#vi  /etc/httpd/conf.d/mod_security.conf
#SecRuleEngine On
SecRuleEngine Off
#SecRequestBodyAccess On
SecRequestBodyAccess Off

 

I'm a IT Infrastructure and Operations Architect with extensive experience and administration skills and works for Turk Telekom. I provide hardware and software support for the IT Infrastructure and Operations tasks.

205 Total Posts
Follow Me