Linux Capable published a tutorial showing you how to secure NGINX with custom Fail2ban filters.
Install/Enable Secure NGINX with Custom Fail2ban Filters
Learn how to install, enable, create secure nginx and fail2ban filters on any Linux server or instance along with other examples of security.
Install/Enable Secure NGINX with Custom Fail2ban Filters - LinuxCapable