Linux Babe published a tutorial about setting up ModSecurity with Nginx on Debian or Ubuntu.
How to Set Up ModSecurity with Nginx on Debian/Ubuntu
This tutorial shows how to install and use ModSecurity with Nginx on Debian/Ubuntu servers. ModSecurity is the most well-known open-source web application firewall (WAF).