Nginx Modules

Is is possible to recompile nginx to use a custom modules (such as mod_security) and still be able to use easyengine commands? If so, how can this be done?

I am using Nginx-Mainline with http2.

I am trying to get the Comodo Free WAF but it requires Mod_security.