From 0724780a0076e934175fb4b042cb12740d88fe26 Mon Sep 17 00:00:00 2001 From: Max Leske <250711+theseion@users.noreply.github.com> Date: Fri, 26 Jul 2024 07:12:26 +0200 Subject: [PATCH] chore: remove unused files The logging configurations haven't been in use for over 5 years, since the `sed` expression for their inclusion was removed (in modsecurity-docker). --- .../extra/httpd-logging-after-modsec.conf | 25 ----------------- .../extra/httpd-logging-before-modsec.conf | 28 ------------------- 2 files changed, 53 deletions(-) delete mode 100644 apache/conf/extra/httpd-logging-after-modsec.conf delete mode 100644 apache/conf/extra/httpd-logging-before-modsec.conf diff --git a/apache/conf/extra/httpd-logging-after-modsec.conf b/apache/conf/extra/httpd-logging-after-modsec.conf deleted file mode 100644 index 4b1b8ce7..00000000 --- a/apache/conf/extra/httpd-logging-after-modsec.conf +++ /dev/null @@ -1,25 +0,0 @@ -# === ModSec Timestamps at the End of Each Phase (ids: 90010 - 90019) - -SecAction "id:90010,phase:1,pass,nolog,setvar:TX.ModSecTimestamp1end=%{DURATION}" -SecAction "id:90011,phase:2,pass,nolog,setvar:TX.ModSecTimestamp2end=%{DURATION}" -SecAction "id:90012,phase:3,pass,nolog,setvar:TX.ModSecTimestamp3end=%{DURATION}" -SecAction "id:90013,phase:4,pass,nolog,setvar:TX.ModSecTimestamp4end=%{DURATION}" -SecAction "id:90014,phase:5,pass,nolog,setvar:TX.ModSecTimestamp5end=%{DURATION}" - - -# === ModSec performance calculations and variable export (ids: 90100 - 90199) - -SecAction "id:90100,phase:5,pass,nolog,\ - setvar:TX.perf_modsecinbound=%{PERF_PHASE1},\ - setvar:TX.perf_modsecinbound=+%{PERF_PHASE2},\ - setvar:TX.perf_application=%{TX.ModSecTimestamp3start},\ - setvar:TX.perf_application=-%{TX.ModSecTimestamp2end},\ - setvar:TX.perf_modsecoutbound=%{PERF_PHASE3},\ - setvar:TX.perf_modsecoutbound=+%{PERF_PHASE4},\ - setenv:ModSecTimeIn=%{TX.perf_modsecinbound},\ - setenv:ApplicationTime=%{TX.perf_application},\ - setenv:ModSecTimeOut=%{TX.perf_modsecoutbound},\ - setenv:ModSecAnomalyScoreInPLs=%{tx.anomaly_score_pl1}-%{tx.anomaly_score_pl2}-%{tx.anomaly_score_pl3}-%{tx.anomaly_score_pl4},\ - setenv:ModSecAnomalyScoreOutPLs=%{tx.outbound_anomaly_score_pl1}-%{tx.outbound_anomaly_score_pl2}-%{tx.outbound_anomaly_score_pl3}-%{tx.outbound_anomaly_score_pl4},\ - setenv:ModSecAnomalyScoreIn=%{TX.anomaly_score},\ - setenv:ModSecAnomalyScoreOut=%{TX.outbound_anomaly_score}" diff --git a/apache/conf/extra/httpd-logging-before-modsec.conf b/apache/conf/extra/httpd-logging-before-modsec.conf deleted file mode 100644 index 776ebc30..00000000 --- a/apache/conf/extra/httpd-logging-before-modsec.conf +++ /dev/null @@ -1,28 +0,0 @@ -ErrorLog ${ERRORLOG} - -ErrorLogFormat ${APACHE_ERRORLOG_FORMAT} - -# For more information regarding the values in the extended log format -# and aliases and scripts to extract information please read: -# https://www.netnea.com/cms/apache-tutorial-5_extending-access-log/ -# https://www.netnea.com/cms/apache-tutorial-7_including-modsecurity-core-rules/ - -LoadModule logio_module /usr/local/apache2/modules/mod_logio.so - -LogFormat "%h %{GEOIP_COUNTRY_CODE}e %u [%{%Y-%m-%d %H:%M:%S}t.%{usec_frac}t] \"%r\" %>s %b \ -\"%{Referer}i\" \"%{User-Agent}i\" \"%{Content-Type}i\" %{remote}p %v %A %p %R \ -%{BALANCER_WORKER_ROUTE}e %X \"%{cookie}n\" %{UNIQUE_ID}e %{SSL_PROTOCOLS}x %{SSL_CIPHERS}x \ -%I %O %{ratio}n%% %D %{ModSecTimeIn}e %{ApplicationTime}e %{ModSecTimeOut}e \ -%{ModSecAnomalyScoreInPLs}e %{ModSecAnomalyScoreOutPLs}e \ -%{ModSecAnomalyScoreIn}e %{ModSecAnomalyScoreOut}e" extended - -CustomLog ${ACCESSLOG} extended - - -# === ModSec timestamps at the start of each phase (ids: 90000 - 90009) - -SecAction "id:90000,phase:1,nolog,pass,setvar:TX.ModSecTimestamp1start=%{DURATION}" -SecAction "id:90001,phase:2,nolog,pass,setvar:TX.ModSecTimestamp2start=%{DURATION}" -SecAction "id:90002,phase:3,nolog,pass,setvar:TX.ModSecTimestamp3start=%{DURATION}" -SecAction "id:90003,phase:4,nolog,pass,setvar:TX.ModSecTimestamp4start=%{DURATION}" -SecAction "id:90004,phase:5,nolog,pass,setvar:TX.ModSecTimestamp5start=%{DURATION}"