1

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"

3 Answers 3

5

Edit the /etc/sysconfig/httpd file. Change

#HTTPD=/usr/sbin/httpd.worker

to

HTTPD=/usr/sbin/httpd.worker

and restart the apache service.

3
  • 1
    I dont have both the files, I have my apache installed undet /opt/httpd/ Feb 28, 2012 at 20:54
  • 1
    Then apache is installed from something other than the standard packages. One would need to know where you got the package from or if you've built apache from source
    – Solvent
    Feb 28, 2012 at 23:14
  • 1
    Well I got it from httpd.apache.org/download.cgi#apache24 and untared it to my server location. Feb 29, 2012 at 1:35
0

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

0

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:

    /etc/httpd/conf.modules.d/00-mpm.conf    

LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
#LoadModule mpm_worker_module modules/mod_mpm_worker.so
#LoadModule mpm_event_module modules/mod_mpm_event.so

systemctl restart httpd

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .