This guide installs ModSecurity on a Linux host.
Use your package manager or the vendor installer.
Set rules, signatures, or scan schedules as required.
Run a test scan or query to confirm the tool works.
sudo apt update
sudo apt install -y libapache2-mod-security2
sudo a2enmod security2
sudo systemctl restart apache2
Enable the OWASP CRS package if available in your repository and start in detection mode before enforcing blocking.
Review ModSecurity Security before production rollout.
Automate installs with ModSecurity Ansible Setup.
Prefer containers? See ModSecurity Docker Setup.
Learn more in ModSecurity History and ModSecurity Links.
Any questions?
Feel free to contact us. Find all contact information on our contact page.