Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #81859

Re: Apache configuration question - MPM modules

From Lars Poulsen <lars@beagle-ears.com>
Newsgroups comp.os.linux.misc, alt.unix.geeks
Subject Re: Apache configuration question - MPM modules
Date 2026-02-08 14:16 +0000
Organization A noiseless patient Spider
Message-ID <slrn10oh6me.3lr9e.lars@cleo.beagle-ears.com> (permalink)
References <slrn10ofb8d.3cerc.lars@cleo.beagle-ears.com> <10m8cjj$1evfn$2@dont-email.me> <slrn10oh5su.3lr9e.lars@cleo.beagle-ears.com>

Cross-posted to 2 groups.

Show all headers | View raw


[Oops, forgot to set the cross-post]

On 2026-02-08, Lars Poulsen <lars@beagle-ears.com> wrote:
> On 2026-02-07, Lawrence D’Oliveiro <ldo@nz.invalid> wrote:
>> On Sat, 7 Feb 2026 21:22:21 -0000 (UTC), Lars Poulsen wrote:
>>> I vaguely remember a long time ago having to select among 2 or 3
>>> different MPM modules, using configuration statements in httpd.conf,
>>> but looking at the httpd.conf file that I carried over from the old
>>> system, I do not see any such statements.
>>
>> Configuration of module loads (similar to virtual sites) is not done
>> via httpd.conf (or the files it includes), it is done by symlinking
>> relevant entries from mods-available into mods-enabled. Here are the
>> MPM choices available on my current machine:
>>
>>     root@theon:~ # ls -l /etc/apache2/mods-available/mpm*
>>     -rw-r--r-- 1 root root 613 Apr 13  2023 /etc/apache2/mods-available/mpm_event.conf
>>     -rw-r--r-- 1 root root 106 Jun  9  2022 /etc/apache2/mods-available/mpm_event.load
>>     -rw-r--r-- 1 root root 500 Apr 13  2023 /etc/apache2/mods-available/mpm_prefork.conf
>>     -rw-r--r-- 1 root root 108 Jun  9  2022 /etc/apache2/mods-available/mpm_prefork.load
>>     -rw-r--r-- 1 root root 780 Apr 13  2023 /etc/apache2/mods-available/mpm_worker.conf
>>     -rw-r--r-- 1 root root 107 Jun  9  2022 /etc/apache2/mods-available/mpm_worker.load
>>
>> And which one is enabled:
>>
>>     root@theon:~ # ls -l /etc/apache2/mods-enabled/mpm*
>>     lrwxrwxrwx 1 root root 34 May 26  2023 /etc/apache2/mods-enabled/mpm_prefork.conf -> ../mods-available/mpm_prefork.conf
>>     lrwxrwxrwx 1 root root 34 May 26  2023 /etc/apache2/mods-enabled/mpm_prefork.load -> ../mods-available/mpm_prefork.load
>
> This looks like it is VERY distribution dependent. Which incidentally is
> a good reason for most of us to stick with the distribution that we know
> well. Which distribution are you using?
>
> It also highlights how complex these configurations can be, and how hard
> it can be to find the relevant documentattion. From the various articles
> that Edge AI dug up for me, it appears that Ubuntu (or is it all the way
> back at Debian?) has a set of utility programs that manipulates the
> configuration files, which do not exist in Fedora. So there will be
> conflicts in the documentation between Apache documentation, Redhat
> documentation and Ubuntu documentation.
>
> It turns out that on Fedora, there is no /etc/apache2/ configuration
> tree. The corresponding tree is under /etc/httpd/.
>
> The main configuration file is /etc/httpd/conf/httpd.conf, which
> includes
>     /etc/httpd/conf.modules.d/*
>  near the top and
>     /etc/httpd/conf.d/*
>     /etc/httpd/conf/httpd-le-ssl.conf
>  near the end.
>
> I had not realized that there were two different directories of conf.*.d
> files; back when I originally worked actively on this, the LoadModule
> statements were in a long list of files in httpd.conf
>
> But while your information was wrong for my system, it was still
> helpful. After reading your post, I found
>     /etc/httpd/conf.modules.d/00-mpm.conf
>  which contains:
>  ----------------------------
> # Select the MPM module which should be used by uncommenting exactly
> # one of the following LoadModule lines.  See the httpd.conf(5) man
> # page for more information on changing the MPM.
>
> # prefork MPM: Implements a non-threaded, pre-forking web server
> # See: http://httpd.apache.org/docs/2.4/mod/prefork.html
> #
> # NOTE: If enabling prefork, the httpd_graceful_shutdown SELinux
> # boolean should be enabled, to allow graceful stop/shutdown.
> #
> 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
>  ----------------------------
>
> So when they deprecated mpm_prefork, they still left it as the default.
> I am now changing this.
>
> Crossposted to alt.unix.geeks, where it will be easier for me to find later.
> There are other questions there, which were less on-topic here.


-- 
Lars Poulsen - an old geek in Santa Barbara, California

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Apache configuration question - MPM modules Lars Poulsen <lars@beagle-ears.com> - 2026-02-07 21:22 +0000
  Re: Apache configuration question - MPM modules Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-02-07 21:59 +0000
    Re: Apache configuration question - MPM modules Lars Poulsen <lars@beagle-ears.com> - 2026-02-08 14:03 +0000
      Re: Apache configuration question - MPM modules Lars Poulsen <lars@beagle-ears.com> - 2026-02-08 14:16 +0000
  Re: Apache configuration question - MPM modules jayjwa <jayjwa@atr2.ath.cx.invalid> - 2026-02-08 16:27 -0500

csiph-web