No data received with SecResponseBodyAccess On - Apache 2.2.31
Custom compiled Apache 2.2.31 using included latest apr and apr-util. All is fine. Compiled mod_security 2.9.1 with latest apr and apr-util, same as Apache.
Once the option "SecResponseBodyAccess On" is enabled with these actions: SecResponseBodyAccess On SecResponseBodyMimeType text/html text/plain text/xml SecResponseBodyLimit 2621440 SecResponseBodyLimitAction ProcessPartial
and Apache is restarted, hitting any page results in: wget http://127.0.0.1/ --2016-09-29 19:12:30-- http://127.0.0.1/ Connecting to 127.0.0.1:80... connected. HTTP request sent, awaiting response... No data received. Retrying.
and no page data is returned. Apache access log shows the hit and a 200 response.
Compiled Apache 2.4.23 with same parameters, mod_security with this setting works fine. If I comment out "SecResponseBodyLimitAction ProcessPartial" it seems to work fine as well.
Is this a known issue? Anything else you want me to try / change?
are you using rewrite rules to index.php or something?
The URL I gave was just an example. It happens for static html pages, 404 pages, etc... All URLs return the "No data received". Apache config using:
SecRuleEngine On SecRequestBodyAccess On SecResponseBodyAccess On SecResponseBodyLimitAction ProcessPartial
Hi @robfico,
Can you paste here the very first lines of your error_log, just after restart your web server?
Sure. centOS 6, 64bit OS. From error_log:
[Fri Sep 30 13:40:20 2016] [notice] FastCGI: process manager initialized (pid 10174) [Fri Sep 30 13:40:20 2016] [notice] Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/1.0.1e-fips DAV/2 mod_fastcgi/mod_fastcgi-SNAP-0811090952 configured -- resuming normal operations
Apache compiled with:
"./configure"
"--prefix=/usr/local/apache"
"--with-mpm=worker"
"--with-included-apr"
"--with-z"
"--with-ssl"
"--enable-ssl"
"--enable-deflate"
"--enable-unique-id"
"--enable-mods-shared=most"
"--disable-info"
"$@"
there should be a message from ModSecurity within your error log. Something limilar to:
[...] ModSecurity for Apache/2.7.7 (http://www.modsecurity.org/) configured.
[...] ModSecurity: APR compiled version="1.4.8"; loaded version="1.4.8"
[...] ModSecurity: PCRE compiled version="8.31 "; loaded version="8.31 2012-07-06"
[...] ModSecurity: LUA compiled version="Lua 5.1"
[...] ModSecurity: LIBXML compiled version="2.9.1"
I moved around the loading of modules, and it now outputs the full mod_security lines...Seems the APR libraries were mismtached due to Apache not picking up apr as I loaded them. Corrected APR mis-match, all better now. Sorry for the false alarm... closing.