I recently installed Apache/2.4.6 from source. At present the MPM module enabled is mpm_event_module. I want to enable the prefork mpm, but not sure from where to do that. I am aware of changing the mpm module from /etc/sysconfig/httpd in case of the apache installed using yum. But in my case as the installinon is from source, I could not not do the same. I tried recompiling apche using './configure --prefix=/usr/local/apache --enable-module=prefork' , but the mpm is still mpm_event_module. Clearly the issue is with defining prefork as the mpm.
I could also see that the installation directory has the prefork.c module. There must be a way to define it as the mpm.
Could someone please help.
In versions prior to 2.4, you cannot change the MPM of the binary Apache2 installation at run-time.
You have to compile Apache with the desired MPM using the --with-mpm=MODULE NAME
command line option to the config script. To change MPM, the binary must be rebuilt.
You can determine which MPM Apache2 is currently built with by executing apache2 -l
or httpd -l
on the command line.
Brief but very clear documentation on this:
http://httpd.apache.org/docs/2.2/mpm.html
In version 2.4, you can also build MPMs as dynamic modules which allows changing the MPM at run-time.
http://httpd.apache.org/docs/2.4/mpm.html#dynamic
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With