ModSecurity is a plugin for Apache web servers which functions as a web application layer firewall. It's used to prevent attacks towards script-driven Internet sites by employing security rules that contain certain expressions. In this way, the firewall can block hacking and spamming attempts and preserve even websites that are not updated regularly. For instance, a number of failed login attempts to a script admin area or attempts to execute a particular file with the objective to get access to the script shall trigger particular rules, so ModSecurity shall block these activities the second it identifies them. The firewall is extremely efficient as it tracks the entire HTTP traffic to a website in real time without slowing it down, so it will be able to prevent an attack before any damage is done. It also keeps an exceptionally thorough log of all attack attempts that contains more info than standard Apache logs, so you could later analyze the data and take further measures to improve the security of your websites if necessary.