summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2014-08-23 11:37:48 +0400
committerMichael Raskin <7c6f434c@mail.ru>2014-08-23 11:37:48 +0400
commitc0da615c02e2433063e6a249f38eb7d8b84470ae (patch)
tree5853c4bb2b5bf3aefa3d396bc2790f75d121e72b /nixos/modules
parent38d9a1cf0e7a7d93349ccdff90b1c15f46511919 (diff)
parentcab929c6c25d69012dc9d161b0068a5c3bf26718 (diff)
downloadnixlib-c0da615c02e2433063e6a249f38eb7d8b84470ae.tar
nixlib-c0da615c02e2433063e6a249f38eb7d8b84470ae.tar.gz
nixlib-c0da615c02e2433063e6a249f38eb7d8b84470ae.tar.bz2
nixlib-c0da615c02e2433063e6a249f38eb7d8b84470ae.tar.lz
nixlib-c0da615c02e2433063e6a249f38eb7d8b84470ae.tar.xz
nixlib-c0da615c02e2433063e6a249f38eb7d8b84470ae.tar.zst
nixlib-c0da615c02e2433063e6a249f38eb7d8b84470ae.zip
Merge pull request #3230 from robberer/module/httpd
httpd: disable logging when logFormat = "none"
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/web-servers/apache-httpd/default.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixos/modules/services/web-servers/apache-httpd/default.nix
index 78f3cf2b7e49..b83cf276ed52 100644
--- a/nixos/modules/services/web-servers/apache-httpd/default.nix
+++ b/nixos/modules/services/web-servers/apache-httpd/default.nix
@@ -130,7 +130,7 @@ let
   '';
 
 
-  loggingConf = ''
+  loggingConf = (if mainCfg.logFormat != "none" then ''
     ErrorLog ${mainCfg.logDir}/error_log
 
     LogLevel notice
@@ -141,7 +141,9 @@ let
     LogFormat "%{User-agent}i" agent
 
     CustomLog ${mainCfg.logDir}/access_log ${mainCfg.logFormat}
-  '';
+  '' else ''
+    ErrorLog /dev/null
+  '');
 
 
   browserHacks = ''