1 { lib, phpbb, gnused }:
6 varDir = "/var/lib/phpbb";
10 if [ ! -d ${varDir} ]; then
11 install -m 0755 -o ${apache.user} -g ${apache.user} -d ${varDir}
12 cp -a ${phpbb}/vars/* ${varDir}
13 chown -R ${apache.user}:${apache.user} ${varDir}
15 install -m 0750 -o ${apache.user} -g ${apache.group} -d ${varDir}/phpSessions
22 modules = [ "proxy_fcgi" ];
23 webappName = "tools_phpbb";
24 root = "/run/current-system/webapps/${webappName}";
25 vhostConf = socket: ''
26 Alias /forum "${root}"
28 DirectoryIndex index.php
30 SetHandler "proxy:unix:${socket}|fcgi://localhost"
34 Options FollowSymlinks
37 # add instal to the list after install
38 <LocationMatch "^/(cache|files|install|store)>
44 serviceDeps = [ "postgresql.service" ];
45 basedir = builtins.concatStringsSep ":" [ "/run/wrappers/bin/sendmail" phpbb varDir ];
47 "listen.owner" = apache.user;
48 "listen.group" = apache.group;
50 "pm.max_children" = "60";
51 "pm.process_idle_timeout" = "60";
53 # Needed to avoid clashes in browser cookies (same domain)
54 "php_value[session.name]" = "PhpBBPHPSESSID";
55 "php_admin_value[open_basedir]" = "${basedir}:/tmp";
56 "php_admin_value[session.save_path]" = "${varDir}/phpSessions";