Courses / Basic Web Application Firewall with ModSecurity
Lesson 3 of 8

Installing ModSecurity on Nginx

▶

Video by HackerSploit on YouTube · 30 min. We did not make this video and we do not host it — watching it here still counts as a view for the creator.

Nginx uses the ModSecurity connector (modsecurity‑nginx). You’ll compile the connector against the ModSecurity library and add the modsecurity_rules_file directive to your server block. A common mistake is mismatching library versions, which leads to a failed start.

After a successful build, test the configuration with nginx -t. In real deployments you often run Nginx as a reverse proxy in front of an app server, so the WAF sits at the edge, inspecting all inbound traffic.

Start learning free

Sign in with your email, Google or GitHub. No password to remember. The same account carries your progress, your certificates and anything else you do with Nexgino later.

Sign in to continue

It takes about fifteen seconds.