]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - nixops/modules/websites/tellesflorian/tellesflorian.nix
Move integration websites to use stable web directory
[perso/Immae/Config/Nix.git] / nixops / modules / websites / tellesflorian / tellesflorian.nix
index 028a235adef9115392b801bcdfcbf979e481d3e8..47142c8d46e33757252d975e639daef94368326e 100644 (file)
@@ -47,10 +47,12 @@ let
     passwords = writeText "tellesflorian_passwords" ''
       invite:${config.invite_passwords}
       '';
-    apache = {
+    apache = rec {
       user = "wwwrun";
       group = "wwwrun";
       modules = [ "proxy_fcgi" ];
+      webappName = "florian_${environment}";
+      root = "/run/current-system/webapps/${webappName}";
       vhostConf = ''
       <FilesMatch "\.php$">
         SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
@@ -68,7 +70,7 @@ let
         ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://tellesflorian.com\"></html>"
       </Location>
 
-      <Directory ${webRoot}>
+      <Directory ${root}>
         Options Indexes FollowSymLinks MultiViews Includes
         AllowOverride None
         Require all granted
@@ -109,7 +111,7 @@ let
 
       </Directory>
       '' else ''
-      <Directory ${webRoot}>
+      <Directory ${root}>
         Options Indexes FollowSymLinks MultiViews Includes
         AllowOverride All
         Require all granted