ModSecurity is a powerful firewall for Apache web servers which is used to prevent attacks toward web apps. It tracks the HTTP traffic to a particular website in real time and blocks any intrusion attempts the instant it identifies them. The firewall uses a set of rules to accomplish that - as an example, attempting to log in to a script administration area unsuccessfully a few times activates one rule, sending a request to execute a particular file that may result in gaining access to the website triggers another rule, and so on. ModSecurity is one of the best firewalls available on the market and it'll preserve even scripts which aren't updated on a regular basis because it can prevent attackers from employing known exploits and security holes. Incredibly detailed information about every intrusion attempt is recorded and the logs the firewall keeps are a lot more specific than the regular logs generated by the Apache server, so you may later examine them and determine if you need to take extra measures so as to boost the security of your script-driven websites.