mod_security causing the ERR_CONNECTION_TIMEOUT (!?)

webunity

Verified User
Joined
Sep 23, 2014
Messages
49
Related to my other post where I ruled out CSF to be culprit i am continuing my investigation what can cause the ERR_CONNECTION_TIMEOUT issues i see on my server.

I have also ruled out http2 since by removing the http2 protocol from /etc/httpd/conf/extra/httpd-phpmodules.conf like this (old):
ProtocolsHonorOrder On
Protocols h2 h2c http/1.1

New:
ProtocolsHonorOrder On
Protocols http/1.1

Followed by restarting httpd and verifying protocol switched to http/1.1 the issue was still reproducible.

So then i commented out the line "Include /etc/httpd/conf/extra/httpd-modsecurity.conf"; which has these contents:
<IfModule mod_security2.c>
# Default recommended configuration
SecRuleEngine On
SecRequestBodyAccess On
SecDefaultAction "phase:2,deny,log,status:406"
SecRequestBodyLimitAction ProcessPartial
SecResponseBodyLimitAction ProcessPartial
SecRequestBodyLimit 13107200
SecRequestBodyNoFilesLimit 131072
SecAuditLogFormat JSON

SecPcreMatchLimit 250000
SecPcreMatchLimitRecursion 250000

SecCollectionTimeout 600

SecDebugLog /var/log/httpd/modsec_debug.log
SecDebugLogLevel 0
SecAuditEngine RelevantOnly

<IfModule mod_ruid2.c>
SecAuditLogDirMode 1733
SecAuditLogFileMode 0550
SecAuditLogType Concurrent
SecAuditLogStorageDir /var/log/modsec_audit
</IfModule>
SecAuditLog /var/log/httpd/modsec_audit.log
SecUploadDir /tmp
SecTmpDir /tmp
SecDataDir /tmp
SecTmpSaveUploadedFiles on

# ModSecurity Core Rules Set and Local configuration
IncludeOptional /etc/modsecurity.d/*.conf.main
IncludeOptional /etc/modsecurity.d/*.conf
IncludeOptional /usr/local/directadmin/data/admin/modsecurity_rules
</IfModule>

It now seems the problem is gone, but somehow i have the feeling i do want to have mod_security.

So my question is; can you guys post your mod_security contents?
 
Back
Top