]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/ludivinecassal/production.nix
Upgrade nixos
[perso/Immae/Config/Nix.git] / modules / private / websites / ludivinecassal / production.nix
index c6f0cf3d23c8071e804f4a47afde617e95f48a5d..5761be7af22d352b08d536f502854d931f5997a6 100644 (file)
@@ -24,16 +24,16 @@ in {
         "./bin/console --env=${app.environment} cache:clear --no-warmup"
       ];
       phpOpenbasedir = [ "/tmp" ];
-      phpPool = ''
-        php_admin_value[upload_max_filesize] = 20M
-        php_admin_value[post_max_size] = 20M
-        ;php_admin_flag[log_errors] = on
-        pm = dynamic
-        pm.max_children = 20
-        pm.start_servers = 2
-        pm.min_spare_servers = 1
-        pm.max_spare_servers = 3
-      '';
+      phpPool = {
+        "php_admin_value[upload_max_filesize]" = "20M";
+        "php_admin_value[post_max_size]" = "20M";
+        #"php_admin_flag[log_errors]" = "on";
+        "pm" = "dynamic";
+        "pm.max_children" = "20";
+        "pm.start_servers" = "2";
+        "pm.min_spare_servers" = "1";
+        "pm.max_spare_servers" = "3";
+      };
       phpWatchFiles = [
         config.secrets.fullPaths."webapps/${app.environment}-ludivinecassal"
       ];
@@ -85,6 +85,10 @@ in {
       root         = pcfg.webappDirs.ludivinecassal_prod;
       extraConfig  = [
         ''
+        RewriteEngine on
+        RewriteCond "%{HTTP_HOST}" "!^ludivinecassal\.com$" [NC]
+        RewriteRule ^(.+)$ https://ludivinecassal.com$1 [R=302,L]
+
         <FilesMatch "\.php$">
           SetHandler "proxy:unix:${pcfg.phpListenPaths.ludivinecassal_prod}|fcgi://localhost"
         </FilesMatch>