WIP: temmie/userweb: add log processor for apache

This commit is contained in:
h7x4
2026-05-25 23:32:45 +09:00
parent 18ab1ef982
commit 6bc767de6a
6 changed files with 555 additions and 1 deletions

View File

@@ -11,6 +11,8 @@ let
upload_max_filesize = "40M";
});
apache-log-processor = pkgs.callPackage ./apache-log-processor { };
# https://nixos.org/manual/nixpkgs/stable/#ssec-php-user-guide-installing-with-extensions
phpEnv = pkgs.php.buildEnv {
extensions = { all, ... }: with all; [
@@ -193,10 +195,11 @@ in
}
];
logPerVirtualHost = false;
extraConfig = ''
TraceEnable on
LogLevel warn rewrite:trace3
ScriptLog ${cfg.logDir}/cgi.log
'';
virtualHosts."temmie.pvv.ntnu.no" = {
@@ -208,6 +211,11 @@ in
];
extraConfig = ''
CustomLog "${cfg.logDir}/access.log" combined
CustomLog "|${lib.getExe apache-log-processor} access" combined
ErrorLog "|${lib.getExe apache-log-processor} error"
ScriptLog "${cfg.logDir}/cgi.log"
UserDir ${lib.concatMapStringsSep " " (l: "/home/pvv/${l}/*/web-docs") homeLetters}
UserDir disabled root
AddHandler cgi-script .cgi