{ env, mantisbt_2, mantisbt_2-plugins, config }:
rec {
activationScript = {
deps = [ "httpd" ];
text = ''
install -m 0755 -o ${apache.user} -g ${apache.group} -d /var/lib/php/sessions/mantisbt
'';
};
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 config.secrets.fullPaths."webapps/tools-mantisbt" ]
++ webRoot.plugins);
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[open_basedir]" = "${basedir}:/tmp:/var/lib/php/sessions/mantisbt";
"php_admin_value[session.save_path]" = "/var/lib/php/sessions/mantisbt";
};
};
}