From 0442743810c6f6c14386a5a9d6bf8e4d69adbc51 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Sun, 9 Jun 2013 04:07:59 -0400 Subject: t/lib-httpd/apache.conf: do not use LockFile in apache >= 2.4 The LockFile directive from earlier versions of apache has been replaced by the Mutex directive. The latter seems to give sane defaults and does not need any specific customization, so we can get away with just adding a version check to the use of LockFile. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- t/lib-httpd/apache.conf | 2 ++ 1 file changed, 2 insertions(+) (limited to 't') diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf index 542241b229..891edd716c 100644 --- a/t/lib-httpd/apache.conf +++ b/t/lib-httpd/apache.conf @@ -1,5 +1,7 @@ ServerName dummy + LockFile accept.lock + PidFile httpd.pid DocumentRoot www LogFormat "%h %l %u %t \"%r\" %>s %b" common -- cgit v1.2.3 From a8adcc4730339c69d173ea4f10c06d7af4a456b4 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Sun, 9 Jun 2013 04:08:22 -0400 Subject: t/lib-httpd/apache.conf: load extra auth modules in apache 2.4 In apache 2.4, the "Auth*" and "Require" directives have moved into the authn_core and authz_core modules, respectively. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- t/lib-httpd/apache.conf | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 't') diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf index 891edd716c..48e8c8f717 100644 --- a/t/lib-httpd/apache.conf +++ b/t/lib-httpd/apache.conf @@ -47,6 +47,15 @@ ErrorLog error.log += 2.4> + + LoadModule authn_core_module modules/mod_authn_core.so + + + LoadModule authz_core_module modules/mod_authz_core.so + + + PassEnv GIT_VALGRIND PassEnv GIT_VALGRIND_OPTIONS -- cgit v1.2.3 From bb3f7ccadb5270e060cfbbb44f9c80a8c65cc449 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Sun, 9 Jun 2013 04:08:45 -0400 Subject: t/lib-httpd/apache.conf: load compat access module in apache 2.4 In apache 2.4, the "Order" directive has gone away in favor of a new system in mod_authz_host. However, since we want our config file to remain compatible across multiple Apache versions, we can use mod_access_compat to keep using the older style. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- t/lib-httpd/apache.conf | 3 +++ 1 file changed, 3 insertions(+) (limited to 't') diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf index 48e8c8f717..eb44322b1b 100644 --- a/t/lib-httpd/apache.conf +++ b/t/lib-httpd/apache.conf @@ -54,6 +54,9 @@ ErrorLog error.log LoadModule authz_core_module modules/mod_authz_core.so + + LoadModule access_compat_module modules/mod_access_compat.so + PassEnv GIT_VALGRIND -- cgit v1.2.3 From 296f0b3ea9b904982780522215a9c71d4a7bd02c Mon Sep 17 00:00:00 2001 From: Jeff King Date: Sun, 9 Jun 2013 04:09:32 -0400 Subject: t/lib-httpd/apache.conf: configure an MPM module for apache 2.4 Versions of Apache before 2.4 always had a "MultiProcessing Module" (MPM) statically built in, which manages the worker threads/processes. We do not care which one, as it is largely a performance issue, and we put only a light load on the server during our testing. As of Apache 2.4, the MPM module is loadable just like any other module, but exactly one such module must be loaded. On a system where the MPMs are compiled dynamically (e.g., Debian unstable), this means that our test Apache server will not start unless we provide the appropriate configuration. Unfortunately, we do not actually know which MPM modules are available or appropriate for the system on which the tests are running. This patch picks the "prefork" module, as it is likely to be available on all Unix-like systems. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- t/lib-httpd/apache.conf | 3 +++ 1 file changed, 3 insertions(+) (limited to 't') diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf index eb44322b1b..67b6db136e 100644 --- a/t/lib-httpd/apache.conf +++ b/t/lib-httpd/apache.conf @@ -57,6 +57,9 @@ ErrorLog error.log LoadModule access_compat_module modules/mod_access_compat.so + + LoadModule mpm_prefork_module modules/mod_mpm_prefork.so + PassEnv GIT_VALGRIND -- cgit v1.2.3 From 5bdc47eb55aabef3720039181fc360499081a29f Mon Sep 17 00:00:00 2001 From: Jeff King Date: Fri, 21 Jun 2013 14:12:51 -0400 Subject: lib-httpd/apache.conf: check version only after mod_version loads Commit 0442743 introduced an directive near the top of the apache config file. However, at that point we have not yet checked for and loaded the mod_version module. This means that the directive will behave oddly if mod_version is dynamically loaded, failing to match when it should. We can fix this by moving the whole block below the LoadModule directive for mod_version. Reported-by: Brian Gernhardt Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- t/lib-httpd/apache.conf | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 't') diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf index 67b6db136e..0f6f9abbb1 100644 --- a/t/lib-httpd/apache.conf +++ b/t/lib-httpd/apache.conf @@ -1,7 +1,4 @@ ServerName dummy - -LockFile accept.lock - PidFile httpd.pid DocumentRoot www LogFormat "%h %l %u %t \"%r\" %>s %b" common @@ -26,6 +23,10 @@ ErrorLog error.log LoadModule version_module modules/mod_version.so + +LockFile accept.lock + + LoadModule auth_module modules/mod_auth.so -- cgit v1.2.3