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
  • Debian on BTRFS with subvolumes
  • NixOS TIP: OTP in Gnome login screen
  • Arch to Manjaro – the dirty way
  • The anatomy of a smart bulb
  • OpenVPN on 443
Categories
  • from the web
  • just blog
  • linux
    • Debian
    • NixOS
  • phones
  • Phones & Tablets
  • programing
  • security
  • Smart Home
  • Tips & Tricks
  • Uncategorized
  • Web development
  • Windows
Blogroll
  • cheriches.fr
Subscribe by Email
Recent Posts
  • Debian on BTRFS with subvolumes
  • NixOS TIP: OTP in Gnome login screen
  • Arch to Manjaro – the dirty way
  • The anatomy of a smart bulb
  • OpenVPN on 443
Categories
  • from the web (3)
  • just blog (1)
  • linux (20)
    • Debian (1)
    • NixOS (1)
  • phones (1)
  • Phones & Tablets (2)
  • programing (1)
  • security (2)
  • Smart Home (1)
  • Tips & Tricks (16)
  • Uncategorized (1)
  • Web development (1)
  • Windows (1)
Blogroll
  • cheriches.fr
Tags cloud
adb ADS aircrack-ng Android Apache apt-get Arch BTRFS CentOS Chrome Cluster CSS debian Docker Firefox firmware flashing GNOME Google Authenticator High Availability HTTPS javascript KVM linux Manjaro MySQL OpenBeken OpenBK7231T OpenVPN OTP php piwik Postfix Proxy_ARP release RHEL Samba ssh Tuya ubuntu UEFI VPN VRRP windows Youtube
Recent Comments
  • Greg M on The anatomy of a smart bulb
  • The anatomy of a smart bulb #LED @EmilsBits « Adafruit Industries – Makers, hackers, artists, designers and engineers! on The anatomy of a smart bulb
  • Emil C on The anatomy of a smart bulb
  • David Brower on The anatomy of a smart bulb
  • 智能灯泡的解剖 - 偏执的码农 on The anatomy of a smart bulb
Proudly powered by WordPress | Theme: Fmi by Forrss.
Manage Cookie Consent
We use cookies to optimize our website and our service.
Functional cookies Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
View preferences
{title} {title} {title}