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 =