Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have compiled nginx with mod_security support. In error log I can see the support for mod_security

2012/08/27 11:13:11 [info] 602096#0: ModSecurity for nginx/2.7.0-rc2 (http://www.modsecurity.org/) configured.

2012/08/27 11:13:11 [info] 602096#0: ModSecurity: APR compiled version="1.4.2"; loaded version="1.4.2"

2012/08/27 11:13:11 [info] 602096#0: ModSecurity: PCRE compiled version="8.2 "; loaded version="8.02 2010-03-19"

2012/08/27 11:13:11 [info] 602096#0: ModSecurity: Loaded PCRE do not match with compiled!

2012/08/27 11:13:11 [info] 602096#0: ModSecurity: LIBXML compiled version="2.7.8"

I have loaded the ModSecurityConfig and ModSecurityEnabled ModSecurityConfig /usr/local/nginx/conf/modsecurity/modsecurity_crs_41_sql_injection_attacks.conf; ModSecurityEnabled On;

But I cant make mod_security work.

Attacks can get through and I get no error in log file.

Do i need to add any extra configuration to enable mod_security for ngix?

Note: Im using nginx as reverse proxy

Thanks

share|improve this question

1 Answer 1

For those of you that may need a solution to this in the future:

I had to activate mod_security and I did this by adding "SecRuleEngine on" at the head modsecurity_crs_41_sql_injection_attacks.conf

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.