Emil CHERICHES

Emil CHERICHES

RHEL (CentOS) – changing Apache’s MPMs

July 20, 2014 Emil C
No Comments

Well, in EL6 when we wanted to change Apache’s MPMs we would edit /etc/sysconfig/httpd and set the HTTPD variable with the binary needed.It looks something like:

HTTPD=/usr/sbin/httpd.worker

To see the available options we could type the following command:

[root@server ~]# ls  /usr/sbin/httpd*
/usr/sbin/httpd  /usr/sbin/httpd.event  /usr/sbin/httpd.worker

The simple httpd binary uses the Prefork MPM, httpd.worker is the Worker MPM or httpd.event is Event MPM. After changing the variable we would need to restart httpd.

In EL7 (CentOS7/RHEL 7/etc.), that uses Apache 2.4 things have slightly changed. MPMs can now be compiled as DSO modules and to change the wanted MPM we need to edit the file called /etc/httpd/conf.modules.d/00-mpm.conf File contains something like:

# Select the MPM module which should be used by uncommenting exactly
# one of the following LoadModule lines:

# prefork MPM: Implements a non-threaded, pre-forking web server
# See: http://httpd.apache.org/docs/2.4/mod/prefork.html
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

# worker MPM: Multi-Processing Module implementing a hybrid
# multi-threaded multi-process web server
# See: http://httpd.apache.org/docs/2.4/mod/worker.html
#
#LoadModule mpm_worker_module modules/mod_mpm_worker.so

# event MPM: A variant of the worker MPM with the goal of consuming
# threads only for connections with active processing
# See: http://httpd.apache.org/docs/2.4/mod/event.html
#
#LoadModule mpm_event_module modules/mod_mpm_event.so

Here we need to uncomment/comment lines, then restart the httpd service (systemctl restart httpd).

linux CentOSMPMRHEL
Previous Post

Centos7 - reversing to classic iptables

Next Post

Removing old kernels

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • Flash Tasmota on the Sonoff Mini – Linux user experience
  • DokuWiki a simple solution to sorting documentation
  • I discovered Wireguard
  • Using Let’s Encrypt with CentOS (for now)
  • Let’s Encrypt is Trusted

Categories

  • from the web
  • just blog
  • linux
    • Mail Server Series
  • News
  • phones
  • Phones & Tablets
  • programing
  • security
  • Smart Home
  • Tips & Tricks
  • Uncategorized
  • Web development
  • Windows

Blogroll

  • cheriches.fr
Subscribe by Email

Recent Posts

  • Flash Tasmota on the Sonoff Mini – Linux user experience
  • DokuWiki a simple solution to sorting documentation
  • I discovered Wireguard
  • Using Let’s Encrypt with CentOS (for now)
  • Let’s Encrypt is Trusted

Categories

  • from the web (3)
  • just blog (1)
  • linux (23)
    • Mail Server Series (7)
  • News (1)
  • phones (1)
  • Phones & Tablets (2)
  • programing (1)
  • security (2)
  • Smart Home (1)
  • Tips & Tricks (15)
  • Uncategorized (3)
  • Web development (1)
  • Windows (1)

Blogroll

  • cheriches.fr

Tags cloud

12.04 aircrack-ng Android Apache apt-get backports BlackBerry cache CentOS Chrome CSS CyanogenMod debian Dell dotdeb Dovecot Eee PC Firefox FPM GNOME Hardware internet explorer javascript KVM linux MariaDB MPM MySQL Nginx OpenVPN php piwik Postfix Postfix Admin RedHat release RHEL Samba SELinux smarty ubuntu wifi windows xp Youtube

Recent Comments

  • Frank on Dedicated Mail Server Hosting Multiple Domains – Step 3 – Postfix and Dovecot
  • Andrew Schott on Dedicated Mail Server Hosting Multiple Domains – Step 3 – Postfix and Dovecot
  • Emil C on Dedicated Mail Server Hosting Multiple Domains – Step 3 – Postfix and Dovecot
  • Andrew Schott on Dedicated Mail Server Hosting Multiple Domains – Step 3 – Postfix and Dovecot
  • Emil C on Dedicated Mail Server Hosting Multiple Domains – Step 3 – Postfix and Dovecot
Proudly powered by WordPress | Theme: Fmi by Forrss.