angristan / nginx-autoinstall

Compile NGINX from source with custom modules and patches on Debian and Ubuntu
GNU General Public License v3.0
636 stars 237 forks source link

ModSecurity blocks requests #170

Open ponasromas opened 3 years ago

ponasromas commented 3 years ago

When enabling mod_security there is strange problem with connection. After enabling it, few minutes latter all connections timing out.

It is easy to reproduce:

  1. Install nginx with modsec enabled;
  2. Load modsec:
modsecurity         on;
modsecurity_rules_file /etc/nginx/modsec/main.conf;
  1. Visit your website, few pages. Eventually you will encounter infinite loading and timeout.

Maybe related, error.log contains:

2021/02/13 10:17:53 [alert] 31891#31891: *330 open socket #37 left in connection 8
2021/02/13 10:17:53 [alert] 31891#31891: *329 open socket #35 left in connection 9
2021/02/13 10:17:53 [alert] 31891#31891: aborting
angristan commented 3 years ago

I think it would be more useful to report this in https://github.com/SpiderLabs/ModSecurity than here

angristan commented 3 years ago

or https://github.com/SpiderLabs/ModSecurity-nginx/issues