[packages/apache/feat/conf-modules: 48/52] loadmodule mpm

glen glen at pld-linux.org
Mon Jan 29 10:08:20 CET 2018


commit 3a00f6d4d8cc45067910139e76e590bf3eb7ef8e
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat May 2 20:07:30 2015 +0300

    loadmodule mpm

 apache-mpm.conf     |  5 -----
 apache.spec         | 11 ++++++++---
 loadmodule-mpm.conf | 16 ++++++++++++++++
 3 files changed, 24 insertions(+), 8 deletions(-)
---
diff --git a/apache.spec b/apache.spec
index c36a906..9c398b1 100644
--- a/apache.spec
+++ b/apache.spec
@@ -71,6 +71,7 @@ Source29:	%{name}-example.net.conf
 Source30:	%{name}.tmpfiles
 Source31:	%{name}.service
 Source32:	%{name}-mod_http2.conf
+Source33:	loadmodule-mpm.conf
 Patch0:		%{name}-configdir_skip_backups.patch
 Patch1:		%{name}-layout.patch
 Patch2:		%{name}-suexec.patch
@@ -2863,6 +2864,9 @@ LoadModule() {
 	echo "LoadModule ${module}_module modules/mod_$module.so" >> $CONFD_MODULES/$index-mod_$conffile.conf
 }
 
+# Setup mpm. Keep this first
+cp -p %{SOURCE33} $CONFD_MODULES/00-mpm.conf
+
 for module in access_compat actions alias allowmethods asis auth_basic \
 	auth_digest auth_form authn_anon authn_core authn_dbd authn_dbm \
 	authn_file authn_socache authnz_ldap authz_core authz_dbd \
@@ -2885,12 +2889,12 @@ for module in access_compat actions alias allowmethods asis auth_basic \
 	socache_shmcb ssl speling substitute \
 	unique_id usertrack version watchdog xml2enc \
 ; do
-	LoadModule 00 $module
+	LoadModule 05 $module
 done
 
 # append these to dav config
-LoadModule 00 dav_fs dav
-LoadModule 00 dav_lock dav
+LoadModule 05 dav_fs dav
+LoadModule 05 dav_lock dav
 
 # anything in style dir not ending with .css is trash
 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/manual/style/{lang,latex,xsl}
@@ -3175,6 +3179,7 @@ fi
 %attr(750,root,root) %dir %{_sysconfdir}/vhosts.d
 %attr(750,root,root) %dir %{_sysconfdir}/webapps.d
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.modules.d/*mpm.conf
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/common.conf
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/mpm.conf
 %attr(640,root,root) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/vhosts.d/example.net.conf
diff --git a/apache-mpm.conf b/apache-mpm.conf
index 5a1b75c..5303b3a 100644
--- a/apache-mpm.conf
+++ b/apache-mpm.conf
@@ -2,11 +2,6 @@
 # Server-Pool Management (MPM specific)
 #
 
-# MPM to use (only one at a time)
-LoadModule mpm_prefork_module                modules/mod_mpm_prefork.so
-#LoadModule mpm_worker_module                modules/mod_mpm_worker.so
-#LoadModule mpm_event_module                modules/mod_mpm_event.so
-
 #
 # PidFile: The file in which the server should record its process
 # identification number when it starts.
diff --git a/loadmodule-mpm.conf b/loadmodule-mpm.conf
new file mode 100644
index 0000000..a0f4afb
--- /dev/null
+++ b/loadmodule-mpm.conf
@@ -0,0 +1,16 @@
+# Select the MPM module which should be used by uncommenting exactly
+# one of the following LoadModule lines:
+
+# prefork MPM: Implements a non-threaded, pre-forking web server
+# See: http://httpd.apache.org/docs/2.4/mod/prefork.html
+LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
+
+# worker MPM: Multi-Processing Module implementing a hybrid
+# multi-threaded multi-process web server
+# See: http://httpd.apache.org/docs/2.4/mod/worker.html
+#LoadModule mpm_worker_module modules/mod_mpm_worker.so
+
+# event MPM: A variant of the worker MPM with the goal of consuming
+# threads only for connections with active processing
+# See: http://httpd.apache.org/docs/2.4/mod/event.html
+#LoadModule mpm_event_module modules/mod_mpm_event.so
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/apache.git/commitdiff/ed9e6b2216e9b701461ecb12e9c5fadce8c92abb



More information about the pld-cvs-commit mailing list