From 1727c4bd3bc3e4b935623bea01a1c8710a9cfac7 Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Mon, 28 Jan 2008 15:40:29 +0000 Subject: [PATCH] Added mod_jk module to apache httpd svn path=/nixos/trunk/; revision=10310 --- system/options.nix | 10 ++++++++++ upstart-jobs/httpd.nix | 6 ++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/system/options.nix b/system/options.nix index 02f03d8f4aa..1abc7a309e2 100644 --- a/system/options.nix +++ b/system/options.nix @@ -1147,6 +1147,16 @@ description = "Whether to enable the PHP module."; }; + mod_jk = { + enable = mkOption { + default = false; + description = "Whether to enable the Apache Tomcat connector."; + }; + + applicationMappings = mkOption { + default = []; + description = "List of Java webapplications that should be mapped to the servlet container (Tomcat/JBoss)"; + }; subservices = { diff --git a/upstart-jobs/httpd.nix b/upstart-jobs/httpd.nix index 0e1703b08ac..afafcf4f173 100644 --- a/upstart-jobs/httpd.nix +++ b/upstart-jobs/httpd.nix @@ -18,17 +18,19 @@ let stateDir = cfg.stateDir; enableSSL = false; extraDirectories = cfg.extraDirectories + extraConfig; - + applicationMappings = cfg.mod_jk.applicationMappings; + startingDependency = if config.services.gw6c.enable && config.services.gw6c.autorun then "gw6c" else "network-interfaces"; webServer = import ../../services/apache-httpd { inherit (pkgs) apacheHttpd coreutils; stdenv = pkgs.stdenvNewSetupScript; php = if cfg.mod_php then pkgs.php else null; + tomcat_connectors = if cfg.mod_jk.enable then pkgs.tomcat_connectors else null; inherit hostName httpPort httpsPort user group adminAddr logDir stateDir - extraDirectories; + extraDirectories applicationMappings; noUserDir = !cfg.enableUserDir; subServices =