From df7b4f4f6f12ff090f48108838353531aff92507 Mon Sep 17 00:00:00 2001 From: Dan Peebles Date: Thu, 5 Jan 2017 21:19:07 -0500 Subject: [PATCH] httpd module: don't create documentRoot directory if it doesn't exist It hides bugs and do you ever actually want to serve up an empty directory? It was pretty confusing to me when it tried to write into a read-only store path because I accidentally pointed it to the wrong store path. --- .../modules/services/web-servers/apache-httpd/default.nix | 7 ------- 1 file changed, 7 deletions(-) diff --git a/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixos/modules/services/web-servers/apache-httpd/default.nix index 84c608ca2ab..dc0ca501a48 100644 --- a/nixos/modules/services/web-servers/apache-httpd/default.nix +++ b/nixos/modules/services/web-servers/apache-httpd/default.nix @@ -709,13 +709,6 @@ in ''} mkdir -m 0700 -p ${mainCfg.logDir} - ${optionalString (mainCfg.documentRoot != null) - '' - # Create the document root directory if does not exists yet - mkdir -p ${mainCfg.documentRoot} - '' - } - # Get rid of old semaphores. These tend to accumulate across # server restarts, eventually preventing it from restarting # successfully.