aboutsummaryrefslogtreecommitdiff
path: root/nixops/modules
diff options
context:
space:
mode:
Diffstat (limited to 'nixops/modules')
-rw-r--r--nixops/modules/websites/aten/aten.nix6
-rw-r--r--nixops/modules/websites/aten/default.nix10
-rw-r--r--nixops/modules/websites/chloe/chloe.nix10
-rw-r--r--nixops/modules/websites/chloe/default.nix10
-rw-r--r--nixops/modules/websites/connexionswing/connexionswing.nix6
-rw-r--r--nixops/modules/websites/connexionswing/default.nix10
-rw-r--r--nixops/modules/websites/ludivine/default.nix10
-rw-r--r--nixops/modules/websites/ludivine/ludivinecassal.nix6
-rw-r--r--nixops/modules/websites/piedsjaloux/default.nix10
-rw-r--r--nixops/modules/websites/piedsjaloux/piedsjaloux.nix6
-rw-r--r--nixops/modules/websites/tellesflorian/default.nix6
-rw-r--r--nixops/modules/websites/tellesflorian/tellesflorian.nix8
12 files changed, 77 insertions, 21 deletions
diff --git a/nixops/modules/websites/aten/aten.nix b/nixops/modules/websites/aten/aten.nix
index 1910a67..f986ec1 100644
--- a/nixops/modules/websites/aten/aten.nix
+++ b/nixops/modules/websites/aten/aten.nix
@@ -29,10 +29,12 @@ let
29 pm.max_spare_servers = 3 29 pm.max_spare_servers = 3
30 ''}''; 30 ''}'';
31 }; 31 };
32 apache = { 32 apache = rec {
33 user = "wwwrun"; 33 user = "wwwrun";
34 group = "wwwrun"; 34 group = "wwwrun";
35 modules = [ "proxy_fcgi" ]; 35 modules = [ "proxy_fcgi" ];
36 webappName = "aten_${environment}";
37 root = "/run/current-system/webapps/${webappName}";
36 vhostConf = '' 38 vhostConf = ''
37 <FilesMatch "\.php$"> 39 <FilesMatch "\.php$">
38 SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" 40 SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
@@ -64,7 +66,7 @@ let
64 </Location> 66 </Location>
65 ''} 67 ''}
66 68
67 <Directory ${webRoot}> 69 <Directory ${if environment == "dev" then root else webRoot}>
68 Options Indexes FollowSymLinks MultiViews Includes 70 Options Indexes FollowSymLinks MultiViews Includes
69 AllowOverride All 71 AllowOverride All
70 Require all granted 72 Require all granted
diff --git a/nixops/modules/websites/aten/default.nix b/nixops/modules/websites/aten/default.nix
index db2ab49..f586ed5 100644
--- a/nixops/modules/websites/aten/default.nix
+++ b/nixops/modules/websites/aten/default.nix
@@ -42,6 +42,10 @@ in {
42 42
43 services.myPhpfpm.poolConfigs.aten_prod = aten_prod.phpFpm.pool; 43 services.myPhpfpm.poolConfigs.aten_prod = aten_prod.phpFpm.pool;
44 system.activationScripts.aten_prod = aten_prod.activationScript; 44 system.activationScripts.aten_prod = aten_prod.activationScript;
45 system.extraSystemBuilderCmds = ''
46 mkdir -p $out/webapps
47 ln -s ${aten_prod.webRoot} $out/webapps/${aten_prod.apache.webappName}
48 '';
45 services.myWebsites.apacheConfig.aten_prod.modules = aten_prod.apache.modules; 49 services.myWebsites.apacheConfig.aten_prod.modules = aten_prod.apache.modules;
46 services.myWebsites.production.modules = aten_prod.apache.modules; 50 services.myWebsites.production.modules = aten_prod.apache.modules;
47 services.myWebsites.production.vhostConfs.aten = { 51 services.myWebsites.production.vhostConfs.aten = {
@@ -55,11 +59,15 @@ in {
55 security.acme.certs."eldiron".extraDomains."dev.aten.pro" = null; 59 security.acme.certs."eldiron".extraDomains."dev.aten.pro" = null;
56 services.myPhpfpm.poolConfigs.aten_dev = aten_dev.phpFpm.pool; 60 services.myPhpfpm.poolConfigs.aten_dev = aten_dev.phpFpm.pool;
57 system.activationScripts.aten_dev = aten_dev.activationScript; 61 system.activationScripts.aten_dev = aten_dev.activationScript;
62 system.extraSystemBuilderCmds = ''
63 mkdir -p $out/webapps
64 ln -s ${aten_dev.webRoot} $out/webapps/${aten_dev.apache.webappName}
65 '';
58 services.myWebsites.integration.modules = aten_dev.apache.modules; 66 services.myWebsites.integration.modules = aten_dev.apache.modules;
59 services.myWebsites.integration.vhostConfs.aten = { 67 services.myWebsites.integration.vhostConfs.aten = {
60 certName = "eldiron"; 68 certName = "eldiron";
61 hosts = [ "dev.aten.pro" ]; 69 hosts = [ "dev.aten.pro" ];
62 root = aten_dev.webRoot; 70 root = aten_dev.apache.root;
63 extraConfig = [ aten_dev.apache.vhostConf ]; 71 extraConfig = [ aten_dev.apache.vhostConf ];
64 }; 72 };
65 }) 73 })
diff --git a/nixops/modules/websites/chloe/chloe.nix b/nixops/modules/websites/chloe/chloe.nix
index 9752db6..3b92af3 100644
--- a/nixops/modules/websites/chloe/chloe.nix
+++ b/nixops/modules/websites/chloe/chloe.nix
@@ -40,10 +40,12 @@ let
40 pm.max_spare_servers = 3 40 pm.max_spare_servers = 3
41 ''}''; 41 ''}'';
42 }; 42 };
43 apache = { 43 apache = rec {
44 user = "wwwrun"; 44 user = "wwwrun";
45 group = "wwwrun"; 45 group = "wwwrun";
46 modules = [ "proxy_fcgi" ]; 46 modules = [ "proxy_fcgi" ];
47 webappName = "chloe_${environment}";
48 root = "/run/current-system/webapps/${webappName}";
47 vhostConf = '' 49 vhostConf = ''
48 RewriteEngine On 50 RewriteEngine On
49 ${if environment == "prod" then '' 51 ${if environment == "prod" then ''
@@ -54,16 +56,16 @@ let
54 SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" 56 SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
55 </FilesMatch> 57 </FilesMatch>
56 58
57 <Directory ${webRoot}> 59 <Directory ${if environment == "dev" then root else webRoot}>
58 DirectoryIndex index.php index.htm index.html 60 DirectoryIndex index.php index.htm index.html
59 Options -Indexes +FollowSymLinks +MultiViews +Includes 61 Options -Indexes +FollowSymLinks +MultiViews +Includes
60 Include ${webRoot}/htaccess.txt 62 Include ${if environment == "dev" then root else webRoot}/htaccess.txt
61 63
62 AllowOverride AuthConfig FileInfo Limit 64 AllowOverride AuthConfig FileInfo Limit
63 Require all granted 65 Require all granted
64 </Directory> 66 </Directory>
65 67
66 <DirectoryMatch "${webRoot}/squelettes"> 68 <DirectoryMatch "${if environment == "dev" then root else webRoot}/squelettes">
67 Require all denied 69 Require all denied
68 </DirectoryMatch> 70 </DirectoryMatch>
69 71
diff --git a/nixops/modules/websites/chloe/default.nix b/nixops/modules/websites/chloe/default.nix
index 94cd4be..d647eb9 100644
--- a/nixops/modules/websites/chloe/default.nix
+++ b/nixops/modules/websites/chloe/default.nix
@@ -45,6 +45,10 @@ in {
45 extension=${pkgs.php}/lib/php/extensions/mysqli.so 45 extension=${pkgs.php}/lib/php/extensions/mysqli.so
46 ''; 46 '';
47 system.activationScripts.chloe_prod = chloe_prod.activationScript; 47 system.activationScripts.chloe_prod = chloe_prod.activationScript;
48 system.extraSystemBuilderCmds = ''
49 mkdir -p $out/webapps
50 ln -s ${chloe_prod.webRoot} $out/webapps/${chloe_prod.apache.webappName}
51 '';
48 services.myWebsites.production.modules = chloe_prod.apache.modules; 52 services.myWebsites.production.modules = chloe_prod.apache.modules;
49 services.myWebsites.production.vhostConfs.chloe = { 53 services.myWebsites.production.vhostConfs.chloe = {
50 certName = "chloe"; 54 certName = "chloe";
@@ -60,11 +64,15 @@ in {
60 extension=${pkgs.php}/lib/php/extensions/mysqli.so 64 extension=${pkgs.php}/lib/php/extensions/mysqli.so
61 ''; 65 '';
62 system.activationScripts.chloe_dev = chloe_dev.activationScript; 66 system.activationScripts.chloe_dev = chloe_dev.activationScript;
67 system.extraSystemBuilderCmds = ''
68 mkdir -p $out/webapps
69 ln -s ${chloe_dev.webRoot} $out/webapps/${chloe_dev.apache.webappName}
70 '';
63 services.myWebsites.integration.modules = chloe_dev.apache.modules; 71 services.myWebsites.integration.modules = chloe_dev.apache.modules;
64 services.myWebsites.integration.vhostConfs.chloe = { 72 services.myWebsites.integration.vhostConfs.chloe = {
65 certName = "eldiron"; 73 certName = "eldiron";
66 hosts = ["chloe.immae.eu" ]; 74 hosts = ["chloe.immae.eu" ];
67 root = chloe_dev.webRoot; 75 root = chloe_dev.apache.root;
68 extraConfig = [ chloe_dev.apache.vhostConf ]; 76 extraConfig = [ chloe_dev.apache.vhostConf ];
69 }; 77 };
70 }) 78 })
diff --git a/nixops/modules/websites/connexionswing/connexionswing.nix b/nixops/modules/websites/connexionswing/connexionswing.nix
index 307def0..dff563f 100644
--- a/nixops/modules/websites/connexionswing/connexionswing.nix
+++ b/nixops/modules/websites/connexionswing/connexionswing.nix
@@ -56,10 +56,12 @@ let
56 pm.max_spare_servers = 3 56 pm.max_spare_servers = 3
57 ''}''; 57 ''}'';
58 }; 58 };
59 apache = { 59 apache = rec {
60 user = "wwwrun"; 60 user = "wwwrun";
61 group = "wwwrun"; 61 group = "wwwrun";
62 modules = [ "proxy_fcgi" ]; 62 modules = [ "proxy_fcgi" ];
63 webappName = "connexionswing_${environment}";
64 root = "/run/current-system/webapps/${webappName}";
63 vhostConf = '' 65 vhostConf = ''
64 <FilesMatch "\.php$"> 66 <FilesMatch "\.php$">
65 SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" 67 SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
@@ -84,7 +86,7 @@ let
84 ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://connexionswing.com\"></html>" 86 ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://connexionswing.com\"></html>"
85 </Location> 87 </Location>
86 88
87 <Directory ${webRoot}> 89 <Directory ${root}>
88 Options Indexes FollowSymLinks MultiViews Includes 90 Options Indexes FollowSymLinks MultiViews Includes
89 AllowOverride None 91 AllowOverride None
90 Require all granted 92 Require all granted
diff --git a/nixops/modules/websites/connexionswing/default.nix b/nixops/modules/websites/connexionswing/default.nix
index 5ce3525..f176762 100644
--- a/nixops/modules/websites/connexionswing/default.nix
+++ b/nixops/modules/websites/connexionswing/default.nix
@@ -45,6 +45,10 @@ in {
45 services.myPhpfpm.poolConfigs.connexionswing_prod = connexionswing_prod.phpFpm.pool; 45 services.myPhpfpm.poolConfigs.connexionswing_prod = connexionswing_prod.phpFpm.pool;
46 services.myPhpfpm.poolPhpConfigs.connexionswing_prod = connexionswing_prod.phpFpm.phpConfig; 46 services.myPhpfpm.poolPhpConfigs.connexionswing_prod = connexionswing_prod.phpFpm.phpConfig;
47 system.activationScripts.connexionswing_prod = connexionswing_prod.activationScript; 47 system.activationScripts.connexionswing_prod = connexionswing_prod.activationScript;
48 system.extraSystemBuilderCmds = ''
49 mkdir -p $out/webapps
50 ln -s ${connexionswing_prod.webRoot} $out/webapps/${connexionswing_prod.apache.webappName}
51 '';
48 services.myWebsites.production.modules = connexionswing_prod.apache.modules; 52 services.myWebsites.production.modules = connexionswing_prod.apache.modules;
49 services.myWebsites.production.vhostConfs.connexionswing = { 53 services.myWebsites.production.vhostConfs.connexionswing = {
50 certName = "connexionswing"; 54 certName = "connexionswing";
@@ -59,11 +63,15 @@ in {
59 services.myPhpfpm.poolConfigs.connexionswing_dev = connexionswing_dev.phpFpm.pool; 63 services.myPhpfpm.poolConfigs.connexionswing_dev = connexionswing_dev.phpFpm.pool;
60 services.myPhpfpm.poolPhpConfigs.connexionswing_dev = connexionswing_dev.phpFpm.phpConfig; 64 services.myPhpfpm.poolPhpConfigs.connexionswing_dev = connexionswing_dev.phpFpm.phpConfig;
61 system.activationScripts.connexionswing_dev = connexionswing_dev.activationScript; 65 system.activationScripts.connexionswing_dev = connexionswing_dev.activationScript;
66 system.extraSystemBuilderCmds = ''
67 mkdir -p $out/webapps
68 ln -s ${connexionswing_dev.webRoot} $out/webapps/${connexionswing_dev.apache.webappName}
69 '';
62 services.myWebsites.integration.modules = connexionswing_dev.apache.modules; 70 services.myWebsites.integration.modules = connexionswing_dev.apache.modules;
63 services.myWebsites.integration.vhostConfs.connexionswing = { 71 services.myWebsites.integration.vhostConfs.connexionswing = {
64 certName = "eldiron"; 72 certName = "eldiron";
65 hosts = ["connexionswing.immae.eu" "sandetludo.immae.eu" ]; 73 hosts = ["connexionswing.immae.eu" "sandetludo.immae.eu" ];
66 root = connexionswing_dev.webRoot; 74 root = connexionswing_dev.apache.root;
67 extraConfig = [ connexionswing_dev.apache.vhostConf ]; 75 extraConfig = [ connexionswing_dev.apache.vhostConf ];
68 }; 76 };
69 }) 77 })
diff --git a/nixops/modules/websites/ludivine/default.nix b/nixops/modules/websites/ludivine/default.nix
index d13d700..bcbef51 100644
--- a/nixops/modules/websites/ludivine/default.nix
+++ b/nixops/modules/websites/ludivine/default.nix
@@ -38,6 +38,10 @@ in {
38 38
39 services.myPhpfpm.poolConfigs.ludivinecassal_prod = ludivinecassal_prod.phpFpm.pool; 39 services.myPhpfpm.poolConfigs.ludivinecassal_prod = ludivinecassal_prod.phpFpm.pool;
40 system.activationScripts.ludivinecassal_prod = ludivinecassal_prod.activationScript; 40 system.activationScripts.ludivinecassal_prod = ludivinecassal_prod.activationScript;
41 system.extraSystemBuilderCmds = ''
42 mkdir -p $out/webapps
43 ln -s ${ludivinecassal_prod.webRoot} $out/webapps/${ludivinecassal_prod.apache.webappName}
44 '';
41 services.myWebsites.production.modules = ludivinecassal_prod.apache.modules; 45 services.myWebsites.production.modules = ludivinecassal_prod.apache.modules;
42 services.myWebsites.production.vhostConfs.ludivine = { 46 services.myWebsites.production.vhostConfs.ludivine = {
43 certName = "ludivinecassal"; 47 certName = "ludivinecassal";
@@ -51,12 +55,16 @@ in {
51 55
52 services.myPhpfpm.poolConfigs.ludivinecassal_dev = ludivinecassal_dev.phpFpm.pool; 56 services.myPhpfpm.poolConfigs.ludivinecassal_dev = ludivinecassal_dev.phpFpm.pool;
53 system.activationScripts.ludivinecassal_dev = ludivinecassal_dev.activationScript; 57 system.activationScripts.ludivinecassal_dev = ludivinecassal_dev.activationScript;
58 system.extraSystemBuilderCmds = ''
59 mkdir -p $out/webapps
60 ln -s ${ludivinecassal_dev.webRoot} $out/webapps/${ludivinecassal_dev.apache.webappName}
61 '';
54 services.myWebsites.apacheConfig.ludivinecassal_dev.modules = ludivinecassal_dev.apache.modules; 62 services.myWebsites.apacheConfig.ludivinecassal_dev.modules = ludivinecassal_dev.apache.modules;
55 services.myWebsites.integration.modules = ludivinecassal_dev.apache.modules; 63 services.myWebsites.integration.modules = ludivinecassal_dev.apache.modules;
56 services.myWebsites.integration.vhostConfs.ludivine = { 64 services.myWebsites.integration.vhostConfs.ludivine = {
57 certName = "eldiron"; 65 certName = "eldiron";
58 hosts = [ "ludivine.immae.eu" ]; 66 hosts = [ "ludivine.immae.eu" ];
59 root = ludivinecassal_dev.webRoot; 67 root = ludivinecassal_dev.apache.root;
60 extraConfig = [ ludivinecassal_dev.apache.vhostConf ]; 68 extraConfig = [ ludivinecassal_dev.apache.vhostConf ];
61 }; 69 };
62 }) 70 })
diff --git a/nixops/modules/websites/ludivine/ludivinecassal.nix b/nixops/modules/websites/ludivine/ludivinecassal.nix
index 4ce06b2..02614a5 100644
--- a/nixops/modules/websites/ludivine/ludivinecassal.nix
+++ b/nixops/modules/websites/ludivine/ludivinecassal.nix
@@ -60,10 +60,12 @@ let
60 pm.max_spare_servers = 3 60 pm.max_spare_servers = 3
61 ''}''; 61 ''}'';
62 }; 62 };
63 apache = { 63 apache = rec {
64 user = "wwwrun"; 64 user = "wwwrun";
65 group = "wwwrun"; 65 group = "wwwrun";
66 modules = [ "proxy_fcgi" ]; 66 modules = [ "proxy_fcgi" ];
67 webappName = "ludivine_${environment}";
68 root = "/run/current-system/webapps/${webappName}";
67 vhostConf = '' 69 vhostConf = ''
68 <FilesMatch "\.php$"> 70 <FilesMatch "\.php$">
69 SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" 71 SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
@@ -76,7 +78,7 @@ let
76 ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://ludivinecassal.com\"></html>" 78 ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://ludivinecassal.com\"></html>"
77 </Location> 79 </Location>
78 80
79 <Directory ${webRoot}> 81 <Directory ${root}>
80 Options Indexes FollowSymLinks MultiViews Includes 82 Options Indexes FollowSymLinks MultiViews Includes
81 AllowOverride None 83 AllowOverride None
82 Require all granted 84 Require all granted
diff --git a/nixops/modules/websites/piedsjaloux/default.nix b/nixops/modules/websites/piedsjaloux/default.nix
index f1bb760..584e936 100644
--- a/nixops/modules/websites/piedsjaloux/default.nix
+++ b/nixops/modules/websites/piedsjaloux/default.nix
@@ -42,6 +42,10 @@ in {
42 42
43 services.myPhpfpm.poolConfigs.piedsjaloux_prod = piedsjaloux_prod.phpFpm.pool; 43 services.myPhpfpm.poolConfigs.piedsjaloux_prod = piedsjaloux_prod.phpFpm.pool;
44 system.activationScripts.piedsjaloux_prod = piedsjaloux_prod.activationScript; 44 system.activationScripts.piedsjaloux_prod = piedsjaloux_prod.activationScript;
45 system.extraSystemBuilderCmds = ''
46 mkdir -p $out/webapps
47 ln -s ${piedsjaloux_prod.webRoot} $out/webapps/${piedsjaloux_prod.apache.webappName}
48 '';
45 services.myWebsites.production.modules = piedsjaloux_prod.apache.modules; 49 services.myWebsites.production.modules = piedsjaloux_prod.apache.modules;
46 services.myWebsites.production.vhostConfs.piedsjaloux = { 50 services.myWebsites.production.vhostConfs.piedsjaloux = {
47 certName = "piedsjaloux"; 51 certName = "piedsjaloux";
@@ -54,11 +58,15 @@ in {
54 security.acme.certs."eldiron".extraDomains."piedsjaloux.immae.eu" = null; 58 security.acme.certs."eldiron".extraDomains."piedsjaloux.immae.eu" = null;
55 services.myPhpfpm.poolConfigs.piedsjaloux_dev = piedsjaloux_dev.phpFpm.pool; 59 services.myPhpfpm.poolConfigs.piedsjaloux_dev = piedsjaloux_dev.phpFpm.pool;
56 system.activationScripts.piedsjaloux_dev = piedsjaloux_dev.activationScript; 60 system.activationScripts.piedsjaloux_dev = piedsjaloux_dev.activationScript;
61 system.extraSystemBuilderCmds = ''
62 mkdir -p $out/webapps
63 ln -s ${piedsjaloux_dev.webRoot} $out/webapps/${piedsjaloux_dev.apache.webappName}
64 '';
57 services.myWebsites.integration.modules = piedsjaloux_dev.apache.modules; 65 services.myWebsites.integration.modules = piedsjaloux_dev.apache.modules;
58 services.myWebsites.integration.vhostConfs.piedsjaloux = { 66 services.myWebsites.integration.vhostConfs.piedsjaloux = {
59 certName = "eldiron"; 67 certName = "eldiron";
60 hosts = [ "piedsjaloux.immae.eu" ]; 68 hosts = [ "piedsjaloux.immae.eu" ];
61 root = piedsjaloux_dev.webRoot; 69 root = piedsjaloux_dev.apache.root;
62 extraConfig = [ piedsjaloux_dev.apache.vhostConf ]; 70 extraConfig = [ piedsjaloux_dev.apache.vhostConf ];
63 }; 71 };
64 }) 72 })
diff --git a/nixops/modules/websites/piedsjaloux/piedsjaloux.nix b/nixops/modules/websites/piedsjaloux/piedsjaloux.nix
index 2871b0f..a2d9a12 100644
--- a/nixops/modules/websites/piedsjaloux/piedsjaloux.nix
+++ b/nixops/modules/websites/piedsjaloux/piedsjaloux.nix
@@ -49,10 +49,12 @@ let
49 pm.max_spare_servers = 3 49 pm.max_spare_servers = 3
50 ''}''; 50 ''}'';
51 }; 51 };
52 apache = { 52 apache = rec {
53 user = "wwwrun"; 53 user = "wwwrun";
54 group = "wwwrun"; 54 group = "wwwrun";
55 modules = [ "proxy_fcgi" ]; 55 modules = [ "proxy_fcgi" ];
56 webappName = "piedsjaloux_${environment}";
57 root = "/run/current-system/webapps/${webappName}";
56 vhostConf = '' 58 vhostConf = ''
57 <FilesMatch "\.php$"> 59 <FilesMatch "\.php$">
58 SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" 60 SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
@@ -65,7 +67,7 @@ let
65 ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://piedsjaloux.fr\"></html>" 67 ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://piedsjaloux.fr\"></html>"
66 </Location> 68 </Location>
67 69
68 <Directory ${webRoot}> 70 <Directory ${root}>
69 Options Indexes FollowSymLinks MultiViews Includes 71 Options Indexes FollowSymLinks MultiViews Includes
70 AllowOverride None 72 AllowOverride None
71 Require all granted 73 Require all granted
diff --git a/nixops/modules/websites/tellesflorian/default.nix b/nixops/modules/websites/tellesflorian/default.nix
index f347169..389c491 100644
--- a/nixops/modules/websites/tellesflorian/default.nix
+++ b/nixops/modules/websites/tellesflorian/default.nix
@@ -19,11 +19,15 @@ in {
19 security.acme.certs."eldiron".extraDomains."app.tellesflorian.com" = null; 19 security.acme.certs."eldiron".extraDomains."app.tellesflorian.com" = null;
20 services.myPhpfpm.poolConfigs.tellesflorian_dev = tellesflorian_dev.phpFpm.pool; 20 services.myPhpfpm.poolConfigs.tellesflorian_dev = tellesflorian_dev.phpFpm.pool;
21 system.activationScripts.tellesflorian_dev = tellesflorian_dev.activationScript; 21 system.activationScripts.tellesflorian_dev = tellesflorian_dev.activationScript;
22 system.extraSystemBuilderCmds = ''
23 mkdir -p $out/webapps
24 ln -s ${tellesflorian_dev.webRoot} $out/webapps/${tellesflorian_dev.apache.webappName}
25 '';
22 services.myWebsites.integration.modules = adminer.apache.modules ++ tellesflorian_dev.apache.modules; 26 services.myWebsites.integration.modules = adminer.apache.modules ++ tellesflorian_dev.apache.modules;
23 services.myWebsites.integration.vhostConfs.tellesflorian = { 27 services.myWebsites.integration.vhostConfs.tellesflorian = {
24 certName = "eldiron"; 28 certName = "eldiron";
25 hosts = ["app.tellesflorian.com" ]; 29 hosts = ["app.tellesflorian.com" ];
26 root = tellesflorian_dev.webRoot; 30 root = tellesflorian_dev.apache.root;
27 extraConfig = [ 31 extraConfig = [
28 tellesflorian_dev.apache.vhostConf 32 tellesflorian_dev.apache.vhostConf
29 adminer.apache.vhostConf 33 adminer.apache.vhostConf
diff --git a/nixops/modules/websites/tellesflorian/tellesflorian.nix b/nixops/modules/websites/tellesflorian/tellesflorian.nix
index 028a235..47142c8 100644
--- a/nixops/modules/websites/tellesflorian/tellesflorian.nix
+++ b/nixops/modules/websites/tellesflorian/tellesflorian.nix
@@ -47,10 +47,12 @@ let
47 passwords = writeText "tellesflorian_passwords" '' 47 passwords = writeText "tellesflorian_passwords" ''
48 invite:${config.invite_passwords} 48 invite:${config.invite_passwords}
49 ''; 49 '';
50 apache = { 50 apache = rec {
51 user = "wwwrun"; 51 user = "wwwrun";
52 group = "wwwrun"; 52 group = "wwwrun";
53 modules = [ "proxy_fcgi" ]; 53 modules = [ "proxy_fcgi" ];
54 webappName = "florian_${environment}";
55 root = "/run/current-system/webapps/${webappName}";
54 vhostConf = '' 56 vhostConf = ''
55 <FilesMatch "\.php$"> 57 <FilesMatch "\.php$">
56 SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost" 58 SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
@@ -68,7 +70,7 @@ let
68 ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://tellesflorian.com\"></html>" 70 ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://tellesflorian.com\"></html>"
69 </Location> 71 </Location>
70 72
71 <Directory ${webRoot}> 73 <Directory ${root}>
72 Options Indexes FollowSymLinks MultiViews Includes 74 Options Indexes FollowSymLinks MultiViews Includes
73 AllowOverride None 75 AllowOverride None
74 Require all granted 76 Require all granted
@@ -109,7 +111,7 @@ let
109 111
110 </Directory> 112 </Directory>
111 '' else '' 113 '' else ''
112 <Directory ${webRoot}> 114 <Directory ${root}>
113 Options Indexes FollowSymLinks MultiViews Includes 115 Options Indexes FollowSymLinks MultiViews Includes
114 AllowOverride All 116 AllowOverride All
115 Require all granted 117 Require all granted