How do I change from the prefork to worker mpm on Redhat Linux 64bit.
/bin/httpd -l
Compiled in modules:
core.c
mod_access.c
mod_auth.c
mod_include.c
mod_log_config.c
mod_env.c
mod_setenvif.c
mod_ssl.c
prefork.c
http_core.c
mod_mime.c
mod_status.c
mod_autoindex.c
mod_asis.c
mod_cgi.c
mod_negotiation.c
mod_dir.c
mod_imap.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_so.c
bin/httpd -V
Server version: Apache/2.0.55
Server built: Mar 7 2006 00:10:58
Server's Module Magic Number: 20020903:11
Architecture: 32-bit
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT="/opt/httpd/apache-2.0.55"
-D SUEXEC_BIN="/opt/httpd/apache-2.0.55/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
Edit the /etc/sysconfig/httpd file. Change
to
and restart the apache service.
I was able to compile Apache 2.2.22 with the following command to enable worker MPM
./configure --with-included-apr --prefix=/path/to/install/apache-2.2.22 --enable-so --with-mpm=worker
On RHEL7 using Apache httpd version 2.4.6 one can change following file and load alternate mpm i.e prefork or workers or event
Modify following file based on your requirment:
systemctl restart httpd