ModSecurity working with Nginx proxy and Apache webserver?

Stevio

Verified User
Joined
Mar 7, 2016
Messages
9
I have been trying to get this to work but the only way this works is to temporarily change the webserver in options.conf to apache and then install modsecurity.

I am wondering if this is by design or that it should work with the option nginx_apache as a webserver? It would be good to know if someone has this working and updating works perfectly.

When I change it (after it works) back to nginx_apache and I want to a build update in customscript it will add modsecurity settings to nginx and then nginx isn't able to start anymore. In this case I think it's not necessary for nginx to use modsecurity since apache handles all the dynamic content and nginx just the static since it's a reversed proxy.
 
I have been trying to get this to work but the only way this works is to temporarily change the webserver in options.conf to apache and then install modsecurity.

I am wondering if this is by design or that it should work with the option nginx_apache as a webserver? It would be good to know if someone has this working and updating works perfectly.

When I change it (after it works) back to nginx_apache and I want to a build update in customscript it will add modsecurity settings to nginx and then nginx isn't able to start anymore. In this case I think it's not necessary for nginx to use modsecurity since apache handles all the dynamic content and nginx just the static since it's a reversed proxy.

For me the issue was:

cd /usr/local/directadmin/custombuild
./build update
./build set modsecurity yes
./build set modsecurity_ruleset
./build modsecurity
 
Last edited:
For me the issue was:

cd /usr/local/directadmin/custombuild
./build update
./build set modsecurity yes
./build set modsecurity_ruleset
./build modsecurity

Thanks for your reply. I couldn't get it working. So at the moment I am back with apache only (also due some websites are not doing well with nginx). Modsecurity is working great now.
Will try in the future again. (after fixing the issues with some websites)
 
Back
Top