Change apache mpm from event in prefork

I recently installed Apache / 2.4.6 from the source. MPM is currently enabled by mpm_event_module. I want to enable mpm but donโ€™t know where to do it. I know about changing the mpm module from / etc / sysconfig / httpd when installing apache using yum. But in my case, since installinon is the source, I could not do the same. I tried recompiling apche using './configure --prefix = / usr / local / apache --enable-module = prefork', but mpm is still mpm_event_module. Itโ€™s clear that the problem is related to the definition of prefork as mpm.

I could also see that there is a prefork.c module in the installation directory. There must be a way to define it as mpm.

Did anyone help.

+6
source share
1 answer

In versions prior to 2.4, you cannot change the MPM of Apache2 binary installation at run time.

You need to compile Apache with the desired MPM using the command line --with-mpm=MODULE NAME in the config script. To modify MPM, the binary must be rebuilt.

You can determine which MPM Apache2 is currently built by running apache2 -l or httpd -l on the command line.

Brief but very clear documentation on this subject:

http://httpd.apache.org/docs/2.2/mpm.html

In version 2.4, you can also create MPMs as dynamic modules that allow you to modify MPMs at run time.

http://httpd.apache.org/docs/2.4/mpm.html#dynamic

+3
source

Source: https://habr.com/ru/post/953136/


All Articles