]>
Commit | Line | Data |
---|---|---|
a8ef1adb IB |
1 | { lib, phpbb, gnused }: |
2 | rec { | |
a8ef1adb IB |
3 | varDir = "/var/lib/phpbb"; |
4 | activationScript = { | |
5 | deps = [ "wrappers" ]; | |
6 | text = '' | |
7 | if [ ! -d ${varDir} ]; then | |
8 | install -m 0755 -o ${apache.user} -g ${apache.user} -d ${varDir} | |
9 | cp -a ${phpbb}/vars/* ${varDir} | |
10 | chown -R ${apache.user}:${apache.user} ${varDir} | |
11 | fi | |
12 | install -m 0750 -o ${apache.user} -g ${apache.group} -d ${varDir}/phpSessions | |
13 | ''; | |
14 | }; | |
120bcf4d IB |
15 | chatonsHostingProperties = { |
16 | file.datetime = "2022-08-21T22:50:00"; | |
17 | hosting = { | |
18 | name = "phpBB"; | |
19 | description = "Forum software"; | |
20 | website = "https://tools.immae.eu/forum"; | |
21 | logo = "https://www.phpbb.com/favicon.ico"; | |
22 | type = "INSTANCE"; | |
23 | status.level = "OK"; | |
24 | status.description = "OK"; | |
25 | registration.load = "OPEN"; | |
26 | install.type = "PACKAGE"; | |
27 | }; | |
28 | }; | |
a8ef1adb IB |
29 | webRoot = phpbb; |
30 | apache = rec { | |
31 | user = "wwwrun"; | |
32 | group = "wwwrun"; | |
33 | modules = [ "proxy_fcgi" ]; | |
750fe5a4 | 34 | root = webRoot; |
a8ef1adb IB |
35 | vhostConf = socket: '' |
36 | Alias /forum "${root}" | |
37 | <Directory "${root}"> | |
38 | DirectoryIndex index.php | |
39 | <FilesMatch "\.php$"> | |
40 | SetHandler "proxy:unix:${socket}|fcgi://localhost" | |
41 | </FilesMatch> | |
42 | ||
43 | AllowOverride All | |
44 | Options FollowSymlinks | |
45 | Require all granted | |
46 | </Directory> | |
47 | # add instal to the list after install | |
48 | <LocationMatch "^/(cache|files|install|store)> | |
49 | Require all denied | |
50 | </LocationMatch> | |
51 | ''; | |
52 | }; | |
53 | phpFpm = rec { | |
54 | serviceDeps = [ "postgresql.service" ]; | |
55 | basedir = builtins.concatStringsSep ":" [ "/run/wrappers/bin/sendmail" phpbb varDir ]; | |
56 | pool = { | |
57 | "listen.owner" = apache.user; | |
58 | "listen.group" = apache.group; | |
59 | "pm" = "ondemand"; | |
60 | "pm.max_children" = "60"; | |
61 | "pm.process_idle_timeout" = "60"; | |
62 | ||
63 | # Needed to avoid clashes in browser cookies (same domain) | |
64 | "php_value[session.name]" = "PhpBBPHPSESSID"; | |
65 | "php_admin_value[open_basedir]" = "${basedir}:/tmp"; | |
66 | "php_admin_value[session.save_path]" = "${varDir}/phpSessions"; | |
67 | }; | |
68 | }; | |
69 | } |