From 41bf426a661899dacda7b056c2e49784bfca0161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Wed, 21 Apr 2010 20:55:57 +0000 Subject: [PATCH] Making the httpd prefork basic settings configurable. I kept the defaults as they where, to avoid surprises. (150 httpd processes simultaneously answering? Too much for my machines) svn path=/nixos/trunk/; revision=21220 --- .../web-servers/apache-httpd/default.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/modules/services/web-servers/apache-httpd/default.nix b/modules/services/web-servers/apache-httpd/default.nix index 3659b75f22d..d9a1e7d05fe 100644 --- a/modules/services/web-servers/apache-httpd/default.nix +++ b/modules/services/web-servers/apache-httpd/default.nix @@ -283,8 +283,8 @@ let PidFile ${mainCfg.stateDir}/httpd.pid - MaxClients 150 - MaxRequestsPerChild 0 + MaxClients ${toString mainCfg.maxClients} + MaxRequestsPerChild ${toString mainCfg.maxRequestsPerChild} ${let @@ -486,6 +486,18 @@ in "Options appended to the PHP configuration file php.ini."; }; + maxClients = mkOption { + default = 150; + example = 8; + description = "Maximum number of httpd processes (prefork)"; + }; + + maxRequestsPerChild = mkOption { + default = 0; + example = 500; + description = + "Maximum number of httpd requests answered per httpd child (prefork), 0 means unlimited"; + }; } # Include the options shared between the main server and virtual hosts.