{ env, mantisbt_2, mantisbt_2-plugins, config, writeText }: let mantis_config = { config_inc = config.secrets.fullPaths."webapps/tools-mantisbt"; custom_constants_inc = writeText "custom_constants_inc.php" '' ''; custom_strings_inc = writeText "custom_strings_inc.php" '' ''; }; in rec { keys."webapps/tools-mantisbt" = { user = apache.user; group = apache.group; permissions = "0400"; text = '' DirectoryIndex index.php SetHandler "proxy:unix:${socket}|fcgi://localhost" AllowOverride All SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 Options FollowSymlinks Require all granted #Reenable during upgrade Require all denied ''; }; phpFpm = rec { serviceDeps = [ "postgresql.service" "openldap.service" ]; basedir = builtins.concatStringsSep ":" ([ webRoot ] ++ webRoot.plugins ++ builtins.attrValues mantis_config); pool = { "listen.owner" = apache.user; "listen.group" = apache.group; "pm" = "ondemand"; "pm.max_children" = "60"; "pm.process_idle_timeout" = "60"; "php_admin_value[upload_max_filesize]" = "5000000"; "php_admin_value[sendmail_path]" = "/run/wrappers/bin/sendmail -t -i"; "php_admin_value[open_basedir]" = "${basedir}:/tmp:/run/wrappers/bin/sendmail"; "php_admin_value[session.save_handler]" = "redis"; "php_admin_value[session.save_path]" = "'unix:///run/redis-php-sessions/redis.sock?persistent=1&prefix=Tools:MantisBT:'"; }; }; }