How do I tell if apache is running (or configured to run) as prefork or worker?
|
|
The MPM is configured at compile time. One way to figure it out afterwards is to list compiled in modules. That list will include the chosen MPM. The listing can be accomplished running the apache binary, with the -l flag.
Here we find the module worker.c, hence I'm running the worker MPM. |
|||||||||
|
|
The answers given by Series8217 and Andol are both incorrect. The question was, how to tell if Apache is running prefork or worker. The advice given by the other answers only tells what the default MPM is (based on compiled-in modules), not if that default or another choice is being used at the present time. If
Which MPM is actually running can be shown using this process:
Bottom line:
There are answers on many, many web sites saying, use |
|||||||||||||
|
|
On RedHat and derivates, just launch
|
|||
|
|
|
Chris Johnson is correct. Go to httpd.conf => add this line:
Restart apache: /etc/init.d/httpd restart. Then access localhost/server-info by your browser and look at MPM Name section. |
|||||
|
|
The answer from Chris Johnson is right. After enabling the info module, as documented in the Apache Documentation (http://httpd.apache.org/docs/2.2/mod/mod_info.html), this one liner will give you the MPM you're using:
|
|||
|
|
|
In Ubuntu 14.04
Tells You can change it by adding symbolic links for Only one is allowed in a time. |
|||
|
|
|
Here's another method that I expect should be reliable in determine which MPM is in use. Add the following to your
Then check the headers using |
|||
|
|
|
On RHEL/Fedora/etc, run
Here 'Server MPM' is 'Prefork', so my server is running the prefork MPM. |
|||||||||||||
|