]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - nixops/modules/websites/aten/aten.nix
Move integration websites to use stable web directory
[perso/Immae/Config/Nix.git] / nixops / modules / websites / aten / aten.nix
index 1910a67a7afbe7739b67c6f4338e67fe3d8e09b7..f986ec12e4a0a14a2b09a53339f7fa0c453a0d43 100644 (file)
@@ -29,10 +29,12 @@ let
         pm.max_spare_servers = 3
         ''}'';
     };
-    apache = {
+    apache = rec {
       user = "wwwrun";
       group = "wwwrun";
       modules = [ "proxy_fcgi" ];
+      webappName = "aten_${environment}";
+      root = "/run/current-system/webapps/${webappName}";
       vhostConf = ''
       <FilesMatch "\.php$">
         SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
@@ -64,7 +66,7 @@ let
       </Location>
       ''}
 
-      <Directory ${webRoot}>
+      <Directory ${if environment == "dev" then root else webRoot}>
         Options Indexes FollowSymLinks MultiViews Includes
         AllowOverride All
         Require all granted