]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - systems/eldiron/websites/tools/ldap.nix
Squash changes containing private information
[perso/Immae/Config/Nix.git] / systems / eldiron / websites / tools / ldap.nix
similarity index 74%
rename from modules/private/websites/tools/tools/ldap.nix
rename to systems/eldiron/websites/tools/ldap.nix
index 2ca59f7a19c299808912d10818e03d63061e3254..9509169fa3ea2ca7e677a13b0c3df2f5dc1bd1a4 100644 (file)
@@ -1,11 +1,5 @@
 { lib, php, env, writeText, phpldapadmin, config }:
 rec {
-  activationScript = {
-    deps = [ "httpd" ];
-    text = ''
-      install -m 0755 -o ${apache.user} -g ${apache.group} -d /var/lib/php/sessions/phpldapadmin
-      '';
-  };
   keys."webapps/tools-ldap" = {
     user = apache.user;
     group = apache.group;
@@ -62,8 +56,22 @@ rec {
 
       # Needed to avoid clashes in browser cookies (same domain)
       "php_value[session.name]" = "LdapPHPSESSID";
-      "php_admin_value[open_basedir]" = "${basedir}:/tmp:/var/lib/php/sessions/phpldapadmin";
-      "php_admin_value[session.save_path]" = "/var/lib/php/sessions/phpldapadmin";
+      "php_admin_value[open_basedir]" = "${basedir}:/tmp";
+      "php_admin_value[session.save_handler]" = "redis";
+      "php_admin_value[session.save_path]" = "'unix:///run/redis-php-sessions/redis.sock?persistent=1&prefix=Tools:PhpLDAPAdmin:'";
     };
   };
+  monitoringPlugins = [ "http" ];
+  monitoringObjects.service = [
+    {
+      service_description = "ldap website is running on tools.immae.eu";
+      host_name = config.hostEnv.fqdn;
+      use = "external-web-service";
+      check_command = ["check_https" "tools.immae.eu" "/ldap/" "<title>phpLDAPadmin"];
+
+      servicegroups = "webstatus-webapps";
+      _webstatus_name = "LDAP";
+      _webstatus_url = "https://tools.immae.eu/ldap/";
+    }
+  ];
 }