aboutsummaryrefslogtreecommitdiff
path: root/modules/private/websites/papa/maison_bbc.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/private/websites/papa/maison_bbc.nix')
-rw-r--r--modules/private/websites/papa/maison_bbc.nix29
1 files changed, 14 insertions, 15 deletions
diff --git a/modules/private/websites/papa/maison_bbc.nix b/modules/private/websites/papa/maison_bbc.nix
index eb61b6d..11e7937 100644
--- a/modules/private/websites/papa/maison_bbc.nix
+++ b/modules/private/websites/papa/maison_bbc.nix
@@ -9,19 +9,18 @@ in {
9 services.duplyBackup.profiles.papa_maison_bbc.rootDir = varDir; 9 services.duplyBackup.profiles.papa_maison_bbc.rootDir = varDir;
10 services.webstats.sites = [ { name = "maison.bbc.bouya.org"; } ]; 10 services.webstats.sites = [ { name = "maison.bbc.bouya.org"; } ];
11 services.phpfpm.pools.papa_maison_bbc = { 11 services.phpfpm.pools.papa_maison_bbc = {
12 listen = "/run/phpfpm/papa_maison_bbc.sock"; 12 user = "wwwrun";
13 extraConfig = '' 13 group = "wwwrun";
14 user = wwwrun 14 settings = {
15 group = wwwrun 15 "listen.owner" = "wwwrun";
16 listen.owner = wwwrun 16 "listen.group" = "wwwrun";
17 listen.group = wwwrun
18 17
19 pm = ondemand 18 "pm" = "ondemand";
20 pm.max_children = 5 19 "pm.max_children" = "5";
21 pm.process_idle_timeout = 60 20 "pm.process_idle_timeout" = "60";
22 21
23 php_admin_value[open_basedir] = "${varDir}" 22 "php_admin_value[open_basedir]" = varDir;
24 ''; 23 };
25 phpOptions = config.services.phpfpm.phpOptions + '' 24 phpOptions = config.services.phpfpm.phpOptions + ''
26 date.timezone = 'Europe/Paris' 25 date.timezone = 'Europe/Paris'
27 extension=${pkgs.php}/lib/php/extensions/mysqli.so 26 extension=${pkgs.php}/lib/php/extensions/mysqli.so
@@ -34,17 +33,17 @@ in {
34 root = varDir; 33 root = varDir;
35 extraConfig = [ 34 extraConfig = [
36 '' 35 ''
37 Alias /.well-known/acme-challenge ${config.security.acme2.certs.papa.webroot}/.well-known/acme-challenge 36 Alias /.well-known/acme-challenge ${config.security.acme.certs.papa.webroot}/.well-known/acme-challenge
38 RedirectMatch 301 ^/((?!(\.well-known|add.php).*$).*)$ https://maison.bbc.bouya.org/$1 37 RedirectMatch 301 ^/((?!(\.well-known|add.php).*$).*)$ https://maison.bbc.bouya.org/$1
39 <Directory ${varDir}> 38 <Directory ${varDir}>
40 DirectoryIndex index.php index.htm index.html 39 DirectoryIndex index.php index.htm index.html
41 AllowOverride None 40 AllowOverride None
42 Require all granted 41 Require all granted
43 <FilesMatch "\.php$"> 42 <FilesMatch "\.php$">
44 SetHandler "proxy:unix:/run/phpfpm/papa_maison_bbc.sock|fcgi://localhost" 43 SetHandler "proxy:unix:${config.services.phpfpm.pools.papa_maison_bbc.socket}|fcgi://localhost"
45 </FilesMatch> 44 </FilesMatch>
46 </Directory> 45 </Directory>
47 <Directory "${config.security.acme2.certs.papa.webroot}"> 46 <Directory "${config.security.acme.certs.papa.webroot}">
48 Options Indexes FollowSymLinks 47 Options Indexes FollowSymLinks
49 AllowOverride None 48 AllowOverride None
50 Require all granted 49 Require all granted
@@ -64,7 +63,7 @@ in {
64 AllowOverride None 63 AllowOverride None
65 Require all granted 64 Require all granted
66 <FilesMatch "\.php$"> 65 <FilesMatch "\.php$">
67 SetHandler "proxy:unix:/run/phpfpm/papa_maison_bbc.sock|fcgi://localhost" 66 SetHandler "proxy:unix:${config.services.phpfpm.pools.papa_maison_bbc.socket}|fcgi://localhost"
68 </FilesMatch> 67 </FilesMatch>
69 </Directory> 68 </Directory>
70 '' 69 ''