--- src/common/core/modsecurity/confs/server-http/modsecurity-rules.conf.modsec.orig 2026-09-21 08:05:39 UTC +++ src/common/core/modsecurity/confs/server-http/modsecurity-rules.conf.modsec @@ -137,18 +137,18 @@ {% if USE_MODSECURITY_CRS == "yes" -%} # include OWASP CRS configurations {% if effective_crs_version == "3" %} -include /usr/share/bunkerweb/core/modsecurity/files/crs-setup-v3.conf +include /usr/local/share/bunkerweb/common/core/modsecurity/files/crs-setup-v3.conf {% else %} -include /usr/share/bunkerweb/core/modsecurity/files/crs-setup-v4.conf +include /usr/local/share/bunkerweb/common/core/modsecurity/files/crs-setup-v4.conf {% endif %} {% if USE_MODSECURITY_CRS_PLUGINS == "yes" and effective_crs_version != "3" -%} # custom CRS plugins configurations before loading plugins - {% if is_custom_conf("/etc/bunkerweb/configs/crs-plugins-before") %} -include /etc/bunkerweb/configs/crs-plugins-before/*.conf + {% if is_custom_conf("/usr/local/etc/bunkerweb/configs/crs-plugins-before") %} +include /usr/local/etc/bunkerweb/configs/crs-plugins-before/*.conf {% endif %} - {% if MULTISITE == "yes" and is_custom_conf("/etc/bunkerweb/configs/crs-plugins-before/" + service_id) %} -include /etc/bunkerweb/configs/crs-plugins-before/{{ service_id }}/*.conf + {% if MULTISITE == "yes" and is_custom_conf("/usr/local/etc/bunkerweb/configs/crs-plugins-before/" + service_id) %} +include /usr/local/etc/bunkerweb/configs/crs-plugins-before/{{ service_id }}/*.conf {% endif %} {% if is_custom_conf("/etc/nginx/crs-plugins-before") %} include /etc/nginx/crs-plugins-before/*.conf @@ -184,11 +184,11 @@ {% endif %} # custom CRS configurations before loading rules (e.g. exclusions) - {% if is_custom_conf("/etc/bunkerweb/configs/modsec-crs") %} -include /etc/bunkerweb/configs/modsec-crs/*.conf + {% if is_custom_conf("/usr/local/etc/bunkerweb/configs/modsec-crs") %} +include /usr/local/etc/bunkerweb/configs/modsec-crs/*.conf {% endif %} - {% if MULTISITE == "yes" and is_custom_conf("/etc/bunkerweb/configs/modsec-crs/" + service_id) %} -include /etc/bunkerweb/configs/modsec-crs/{{ service_id }}/*.conf + {% if MULTISITE == "yes" and is_custom_conf("/usr/local/etc/bunkerweb/configs/modsec-crs/" + service_id) %} +include /usr/local/etc/bunkerweb/configs/modsec-crs/{{ service_id }}/*.conf {% endif %} {% if is_custom_conf("/etc/nginx/modsec-crs") %} include /etc/nginx/modsec-crs/*.conf @@ -213,18 +213,18 @@ # include OWASP CRS rules {% if effective_crs_version == "3" %} -include /usr/share/bunkerweb/core/modsecurity/files/coreruleset-v3/rules/*.conf +include /usr/local/share/bunkerweb/common/core/modsecurity/files/coreruleset-v3/rules/*.conf {% else %} -include /usr/share/bunkerweb/core/modsecurity/files/coreruleset-v4/rules/*.conf +include /usr/local/share/bunkerweb/common/core/modsecurity/files/coreruleset-v4/rules/*.conf {% endif %} {% if USE_MODSECURITY_CRS_PLUGINS == "yes" and effective_crs_version != "3" %} # custom CRS plugins configurations after loading plugins - {%- if is_custom_conf("/etc/bunkerweb/configs/crs-plugins-after") %} -include /etc/bunkerweb/configs/crs-plugins-after/*.conf + {%- if is_custom_conf("/usr/local/etc/bunkerweb/configs/crs-plugins-after") %} +include /usr/local/etc/bunkerweb/configs/crs-plugins-after/*.conf {%- endif %} - {% if MULTISITE == "yes" and is_custom_conf("/etc/bunkerweb/configs/crs-plugins-after/" + service_id) %} -include /etc/bunkerweb/configs/crs-plugins-after/{{ service_id }}/*.conf + {% if MULTISITE == "yes" and is_custom_conf("/usr/local/etc/bunkerweb/configs/crs-plugins-after/" + service_id) %} +include /usr/local/etc/bunkerweb/configs/crs-plugins-after/{{ service_id }}/*.conf {% endif %} {% if is_custom_conf("/etc/nginx/crs-plugins-after") %} include /etc/nginx/crs-plugins-after/*.conf @@ -256,11 +256,11 @@ {% endif +%} # custom rules after loading the CRS - {% if is_custom_conf("/etc/bunkerweb/configs/modsec") %} -include /etc/bunkerweb/configs/modsec/*.conf + {% if is_custom_conf("/usr/local/etc/bunkerweb/configs/modsec") %} +include /usr/local/etc/bunkerweb/configs/modsec/*.conf {% endif %} - {% if MULTISITE == "yes" and is_custom_conf("/etc/bunkerweb/configs/modsec/" + service_id) %} -include /etc/bunkerweb/configs/modsec/{{ service_id }}/*.conf + {% if MULTISITE == "yes" and is_custom_conf("/usr/local/etc/bunkerweb/configs/modsec/" + service_id) %} +include /usr/local/etc/bunkerweb/configs/modsec/{{ service_id }}/*.conf {% endif %} {% if is_custom_conf("/etc/nginx/modsec") %} include /etc/nginx/modsec/*.conf