Blog

Switching to MPM Event / MPM Worker in Apache (CentOS VPS/Server)

Apache MPM (Multi-Processing Modules) are modules for Apache web server that control the creation of child processes. There are a few different varieties of MPMs available, each with its own type of child process management. The default Apache MPM is Prefork.

Follow the guide below to Disable Prefork MPM and Enable Event MPM on Apache web server. This guide is written for CentOS/RHEL, but should also work with any Apache installation on other Linux operating systems.

Enable Event MPM in Apache

First edit Apache MPM configuration file in your favorite text editor.

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

Comment out the LoadModule line for mpm_prefork_module, mpm_worker_module, and uncomment the LoadModule line for mpm_event_module in configuration, as shown below.

#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 

 

After making above changes, save the file and restart the Apache service.

systemctl restart httpd

Check Active MPM in Apache

Now you have successfully enabled Event MPM in your Apache server. To verify current MPM enabled on your server use following command.

[root@VPS ~]# httpd -V | grep MPM
Server MPM:     event

That’s it! The MPM has been successfully switched to MPM – Event.

This article applies to:

  • Apache on CentOS Linux
  • Apache on RHEL
  • Apache on Fedora Linux
This entry was posted in cPanel/WHM, Linux VPS, Tech Support, VPS Hosting. Bookmark the permalink. Trackbacks are closed, but you can post a comment.



Questions? We're here to help.