]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - nixops/modules/websites/piedsjaloux/piedsjaloux.nix
Remove useless relative symlinks
[perso/Immae/Config/Nix.git] / nixops / modules / websites / piedsjaloux / piedsjaloux.nix
index 2871b0fa968d8af2c60ee34a0d2e0e239321d7cc..bb1726208fd67d65ba8c939d953ec834b9c29a99 100644 (file)
@@ -49,10 +49,12 @@ let
         pm.max_spare_servers = 3
         ''}'';
     };
-    apache = {
+    apache = rec {
       user = "wwwrun";
       group = "wwwrun";
       modules = [ "proxy_fcgi" ];
+      webappName = "piedsjaloux_${environment}";
+      root = "/run/current-system/webapps/${webappName}";
       vhostConf = ''
       <FilesMatch "\.php$">
         SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
@@ -65,7 +67,7 @@ let
         ErrorDocument 401 "<html><meta http-equiv=\"refresh\" content=\"0;url=https://piedsjaloux.fr\"></html>"
       </Location>
 
-      <Directory ${webRoot}>
+      <Directory ${root}>
         Options Indexes FollowSymLinks MultiViews Includes
         AllowOverride None
         Require all granted
@@ -108,7 +110,7 @@ let
       '' else ''
       Use Stats piedsjaloux.fr
 
-      <Directory ${webRoot}>
+      <Directory ${root}>
         Options Indexes FollowSymLinks MultiViews Includes
         AllowOverride All
         Require all granted
@@ -146,7 +148,7 @@ let
           rm app/config/parameters.yml
           ln -sf ${configRoot} app/config/parameters.yml
           rm -rf var/{logs,cache,data,miniatures,tmp}
-          ln -sf ../../../../../../../${varDir}/{logs,cache,data,miniatures,tmp} var/
+          ln -sf ${varDir}/{logs,cache,data,miniatures,tmp} var/
           '';
       });
     webRoot = "${webappDir}/web";