Configuring KeepAlive with Apache RewriteRule [P] Proxying

Published on Author gryzli

Apache can be used for proxying requests with mod_proxy to a certain backend/upstream server. Here is how a simple proxy configuration looks:

The Problem The problem with this configuration is that Apache will create new TCP session to backend (192.168.1.1:8080) for every new request it receives. This might look as an innocent detail at… Continue reading Configuring KeepAlive with Apache RewriteRule [P] Proxying

Centos 6 – Recompile Apache Suexec

Published on Author gryzli1 Comment

By default Centos 6 has Apache (2.2.x) which comes with suexec preinstalled. The suexec module itself could be found here: /etc/httpd/modules/mod_suexec.so There is also a suexec wrapper binary, which is by default installed here: /usr/sbin/suexec   0. What is the problem with default suexec ? Imagine you want to activate Suexec for some of your… Continue reading Centos 6 – Recompile Apache Suexec

ModSecurity (WAF) – File upload is extremely slow

Published on Author gryzliLeave a comment

Is your file upload extremely slow after activating ModSecurity or some rule ? If you happen to experience extremely slow file uploads after activating some ModSecurity rules, there is one thing you should definetely check.   Recently I was trying to use the following directive: SecStreamInBodyInspection On   in order to give me access to… Continue reading ModSecurity (WAF) – File upload is extremely slow

ModSecurity (WAF) – Parsing the response body or what you need to know about it

Published on Author gryzliLeave a comment

Sooner or later, people decide that they need to parse response body in order to detect or prevent some malicious activity. Web application firewalls are useful for exactly the same goal. Whenever it comes to WAF, Mod security is the DIY tool for many people. It has nice integration for parsing response body, but there… Continue reading ModSecurity (WAF) – Parsing the response body or what you need to know about it

Scan uploaded files with Apache + mod_security + scanner script

Published on Author gryzliLeave a comment

A lot of people start thinking about scanning the uploaded files in order to improve their site security. Giving the fact that Apache is the most used web server out there, one way to achieve such thing is by using the powerfull mod_security.   Mod_Security has option, where you can tell it to scan certain… Continue reading Scan uploaded files with Apache + mod_security + scanner script

Strace buggy php script running as cgi – Strace daemon

Published on Author gryzliLeave a comment

Very often I need to strace a script which is not “constantly” running, and must be “catch” during it’s execution. Today I had to debug some bad behaving php script, but because php was running as CGI (mod_suphp) it was hard a task. I had 3¬†choices¬†in order to successfully attach the strace to the php… Continue reading Strace buggy php script running as cgi – Strace daemon