X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Fchloe%2Fintegration.nix;fp=modules%2Fprivate%2Fwebsites%2Fchloe%2Fintegration.nix;h=aedf3a5f0b145a2afefde062df4bed22f4517ba5;hp=7ed385255baa958ad1a202e7e26e9ce1aef265ff;hb=41cce84a02652e22ad967c9f31669092eb3e7f0e;hpb=750fe5a43b957b91a26069cf8a4fe19fc7b2633c diff --git a/modules/private/websites/chloe/integration.nix b/modules/private/websites/chloe/integration.nix index 7ed3852..aedf3a5 100644 --- a/modules/private/websites/chloe/integration.nix +++ b/modules/private/websites/chloe/integration.nix @@ -3,11 +3,8 @@ let apacheUser = config.services.httpd.Inte.user; apacheGroup = config.services.httpd.Inte.group; ccfg = config.myEnv.websites.chloe.integration; - app = pkgs.callPackage ./app { - inherit (ccfg) environment; - inherit (pkgs.webapps) spip; - varDir = "/var/lib/chloe_integration"; - }; + webRoot = "/var/lib/ftp/immae/chloe"; + varDir = "/var/lib/ftp/immae/chloe_var"; cfg = config.myServices.websites.chloe.integration; in { options.myServices.websites.chloe.integration.enable = lib.mkEnableOption "enable Chloe's website in integration"; @@ -20,8 +17,8 @@ in { permissions = "0400"; text = '' SetEnv SPIP_CONFIG_DIR "${./config}" - SetEnv SPIP_VAR_DIR "${app.varDir}" - SetEnv SPIP_SITE "chloe-${app.environment}" + SetEnv SPIP_VAR_DIR "${varDir}" + SetEnv SPIP_SITE "chloe-dev" SetEnv SPIP_LDAP_BASE "dc=immae,dc=eu" SetEnv SPIP_LDAP_HOST "ldaps://ldap.immae.eu" SetEnv SPIP_LDAP_SEARCH_DN "${ccfg.ldap.dn}" @@ -45,8 +42,8 @@ in { "php_admin_value[upload_max_filesize]" = "20M"; "php_admin_value[post_max_size]" = "20M"; # "php_admin_flag[log_errors]" = "on"; - "php_admin_value[open_basedir]" = "${app.spipConfig}:${./config}:${app}:${app.varDir}:/tmp"; - "php_admin_value[session.save_path]" = "${app.varDir}/phpSessions"; + "php_admin_value[open_basedir]" = "${../../../../pkgs/webapps/spip/spip_mes_options.php}:${./config}:${webRoot}:${varDir}:/tmp"; + "php_admin_value[session.save_path]" = "${varDir}/phpSessions"; "pm" = "ondemand"; "pm.max_children" = "5"; "pm.process_idle_timeout" = "60"; @@ -56,8 +53,8 @@ in { system.activationScripts.chloe_integration = { deps = [ "wrappers" ]; text = '' - install -m 0755 -o ${apacheUser} -g ${apacheGroup} -d ${app.varDir} ${app.varDir}/IMG ${app.varDir}/tmp ${app.varDir}/local - install -m 0750 -o ${apacheUser} -g ${apacheGroup} -d ${app.varDir}/phpSessions + install -m 0755 -o ${apacheUser} -g ${apacheGroup} -d ${varDir} ${varDir}/IMG ${varDir}/tmp ${varDir}/local + install -m 0750 -o ${apacheUser} -g ${apacheGroup} -d ${varDir}/phpSessions ''; }; services.websites.env.integration.modules = [ "proxy_fcgi" ]; @@ -65,7 +62,7 @@ in { certName = "integration"; addToCerts = true; hosts = ["chloe.immae.eu" ]; - root = app.webRoot; + root = webRoot; extraConfig = [ '' Include ${config.secrets.fullPaths."websites/chloe/integration"} @@ -76,16 +73,16 @@ in { SetHandler "proxy:unix:${config.services.phpfpm.pools.chloe_integration.socket}|fcgi://localhost" - + DirectoryIndex index.php index.htm index.html Options -Indexes +FollowSymLinks +MultiViews +Includes - Include ${app.webRoot}/htaccess.txt + Include ${webRoot}/htaccess.txt AllowOverride AuthConfig FileInfo Limit Require all granted - + Require all denied