]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/leila/production.nix
Add website for Leila
[perso/Immae/Config/Nix.git] / modules / private / websites / leila / production.nix
index 69c8c4972a3011baaf95edb894e7208e1037e746..4390d592d7e99039bc70ccaf45eba24c6183ef08 100644 (file)
@@ -3,7 +3,7 @@ let
   cfg = config.myServices.websites.leila.production;
   varDir = "/var/lib/ftp/leila";
 in {
-  options.myServices.websites.leila.production.enable = lib.mkEnableOption "enable Leila's website in production";
+  options.myServices.websites.leila.production.enable = lib.mkEnableOption "enable Leila's websites in production";
 
   config = lib.mkIf cfg.enable {
     services.phpfpm.poolConfigs.leila = ''
@@ -23,10 +23,11 @@ in {
     services.webstats.sites = [
       { name = "leila.bouya.org"; }
       { name = "chorale.leila.bouya.org"; }
+      { name = "syrwennecreation.bouya.org"; }
     ];
 
-    services.websites.production.modules = [ "proxy_fcgi" ];
-    services.websites.production.vhostConfs.leila_chorale = {
+    services.websites.env.production.modules = [ "proxy_fcgi" ];
+    services.websites.env.production.vhostConfs.leila_chorale = {
       certName    = "leila";
       addToCerts  = true;
       hosts       = [ "chorale.leila.bouya.org" "chorale-vocanta.fr.nf" "www.chorale-vocanta.fr.nf" ];
@@ -49,7 +50,27 @@ in {
           ''
       ];
     };
-    services.websites.production.vhostConfs.leila = {
+    services.websites.env.production.vhostConfs.leila_syrwenne = {
+      certName    = "leila";
+      addToCerts  = true;
+      hosts       = [ "syrwennecreation.bouya.org" ];
+      root        = "${varDir}/Syrwennecreation";
+      extraConfig = [
+        ''
+        Use Stats syrwennecreation.bouya.org
+        <Directory ${varDir}/Syrwennecreation>
+          DirectoryIndex index.php index.htm index.html
+          Options Indexes FollowSymLinks MultiViews Includes
+          AllowOverride None
+
+          <FilesMatch "\.php$">
+            SetHandler "proxy:unix:/run/phpfpm/leila.sock|fcgi://localhost"
+          </FilesMatch>
+        </Directory>
+          ''
+      ];
+    };
+    services.websites.env.production.vhostConfs.leila = {
       certName     = "leila";
       certMainHost = "leila.bouya.org";
       hosts        = [ "leila.bouya.org" ];