From 055a950331634cd0b86d4209f4a5f081e0f744d4 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Sun, 15 Jul 2007 11:16:01 +0000 Subject: [PATCH] Apache httpd customization - extraDirectories & noUserDir . svn path=/nixos/trunk/; revision=8985 --- system/options.nix | 22 ++++++++++++++++++++++ upstart-jobs/httpd.nix | 8 ++++++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/system/options.nix b/system/options.nix index d421e8d767b..7496c910de5 100644 --- a/system/options.nix +++ b/system/options.nix @@ -736,6 +736,28 @@ "; } + { + name = ["services" "httpd" "noUserDir"]; + default = true; + description = " + Set to false to let users to publish ~/public_html as /~user. +"; + } + + { + name = ["services" "httpd" "extraDirectories"]; + default = ""; + example = " + + Options FollowSymlinks + AllowOverride All + +"; + description = " + These lines go to httpd.conf verbatim. They will go after + directories and directory aliases defined by default. +"; + } { name = ["services" "httpd" "subservices" "subversion" "enable"]; diff --git a/upstart-jobs/httpd.nix b/upstart-jobs/httpd.nix index 864b0ee9bdf..276df7971fd 100644 --- a/upstart-jobs/httpd.nix +++ b/upstart-jobs/httpd.nix @@ -20,12 +20,16 @@ let logDir = getCfg "logDir"; stateDir = getCfg "stateDir"; enableSSL = false; + noUserDir = getCfg "noUserDir"; + extraDirectories = getCfg "extraDirectories"; webServer = import ../services/apache-httpd { - inherit (pkgs) stdenv apacheHttpd coreutils; + inherit (pkgs) apacheHttpd coreutils; + stdenv = pkgs.stdenvNewSetupScript; inherit hostName httpPort httpsPort - user group adminAddr logDir stateDir; + user group adminAddr logDir stateDir + noUserDir extraDirectories; subServices =