Where I can get information about what kind of MPM Apache is using in my Linux system?
Asked
Active
Viewed 6.1k times
5 Answers
71
httpd -V
then look for the Server MPM
line.
Example:
# httpd -V
Server version: Apache/2.2.15 (Unix)
Server built: Aug 2 2013 08:02:15
Server's Module Magic Number: 20051115:25
Server loaded: APR 1.3.9, APR-Util 1.3.9
Compiled using: APR 1.3.9, APR-Util 1.3.9
Architecture: 64-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-
Similarly to what was mentioned in the [comments beneath the currently accepted answer](http://stackoverflow.com/questions/6225404/how-to-find-what-mpm-model-apache-is-using-in-linux-worker-prefor-or-event#comment31195765_8639774), on some systems (such as Ubuntu) you should use `apache2 -V`. – Tom Fenech Nov 03 '14 at 17:28
-
13`apache2 -V` does not look anything like the output above (for me), however `apachectl -V` do. – Zitrax Apr 28 '15 at 14:57
45
noticed the previous answers don't mention apachectl
!
[dlam@some-ubuntu-box~] $ apachectl -V | grep -i mpm
Server MPM: event
--
[dlam@some-fedora-box:~] $ httpd -V | grep -i mpm
Server MPM: Prefork

David Lam
- 4,689
- 3
- 23
- 34
-
Another option is to list Compiled in modules using following command: `/usr/sbin/apache2 -l` And in the output look for worker.c, prefork.c or event.c as one only of them will be present indicating the respective MPM module your apache2 is using. – sactiw Jul 28 '14 at 12:29
-
@okwap as from @JorgeeFG answer this `a2query -M` works on Ubuntu – NineCattoRules Mar 23 '16 at 18:39
-
1For me that was the only working method, because all others did not show any MPM. apach2 -V showed "Server MPM:" and nothing more. In my case "event" was enabled. – randomcontrol May 07 '20 at 10:28
35
In Ubuntu 14.04
a2query -M
Tells event
, prefork
, worker
You can change it by adding symbolic links for mpm_<chosen>
from mods-available
to mods-enabled
in /etc/apache2
.
Only one is allowed in a time.

JorgeeFG
- 5,651
- 12
- 59
- 92
-
1
-
For some reason on my (AWS) Ubuntu 14.04, none of the required environment variables are defined, so none of the other solutions work. This one did. – msanford Aug 15 '16 at 21:54
15
You can see this by checking which modules are compiled with Apache.
See output of the following command:
# httpd -l
From there, seek for prefork.c
.
-
I like @user131003's answer because it tells you in plain english: "Server MPM: Prefork threaded: no" – Tyler Collier Jan 23 '14 at 07:14