diff --git a/authentic-lib.pl b/authentic-lib.pl index 7a59d0960..c2bfc8019 100644 --- a/authentic-lib.pl +++ b/authentic-lib.pl @@ -1870,7 +1870,7 @@ sub init_type sub init { - # Don't log XHR requests + # Don't log XHR requests (exclude from logs) my %tmp_miniserv; get_miniserv_config(\%tmp_miniserv); my $nolog = quotemeta('/stats.cgi?xhr-stats=general'); @@ -1880,6 +1880,13 @@ sub init put_miniserv_config(\%tmp_miniserv); reload_miniserv(); } + my $webpref = "$theme_webprefix/"; + my $nologerr = "${webpref}404.cgi ${webpref}403.cgi ${webpref}401.cgi"; + if ($tmp_miniserv{'nolog'} ne $nologerr) { + $tmp_miniserv{'nolog'} = $nologerr; + put_miniserv_config(\%tmp_miniserv); + reload_miniserv(); + } # Make sure that config directory exists theme_make_config_dir();