Archive for the tag 'Modules'

Apache MPMs and Prefork

Multi-Processing Modules (MPMs)

Multi-Processing Modules (MPMs) are responsible for binding to network ports on the machine, accepting requests, and dispatching children to handle the requests.

MPMs — These modules are only available with Apache 2.x. It is important to remember that only one of these modules can be enabled for Apache 2.0 and 2.2. MPMs allow you to fine-tune how resources are allocated when serving HTTP requests. EasyApache will automatically enable or disable Zend Thread Safe support in PHP, depending upon which MPM you select.

Prefork — This MPM is recommended by cPanel. It causes Apache to fork before requests are made.

Important: If you are using libphp4 or libphp5, you must select Prefork.
Event — Divides the task of serving a single HTTP request across multiple threads.

Worker — Apache forks several times to prevent a single crash from killing the entire Apache process, then each forked process creates numerous threads.

Once the server has been compiled, it is possible to determine which MPM was chosen by using ./httpd -l. This command will list every module that is compiled into the server, including the MPM.


How to check Apache Modules Switched Off in VPS-Optimized Mode

The list of the modules can vary depending on the operating system distribution and architecture. When Parallels Plesk Panel is installed and the optimized mode is switched on, you can check the list in the following files:

* On 32-bit operating systems -


* On 64-bit operating systems -


How to list all the loaded modules in apache

We can use the following command to list all the loaded modules in apache (both DSO and Static)

This example is from a debian box using apache2.

host ~: apache2ctl -t -D DUMP_MODULES

Loaded Modules:
core_module (static)
log_config_module (static)
logio_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
alias_module (shared)
auth_basic_module (shared)
authn_file_module (shared)
authz_default_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgi_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
mime_module (shared)
negotiation_module (shared)
php5_module (shared)
setenvif_module (shared)
status_module (shared)
Syntax OK

Problem importing one of the Python modules required to run yum

Error: There was a problem importing one of the Python modules required to run yum. … Cannot allocate memory.

Solution: Python frequently runs into the memory limits set inside WHM and cPanel. You may be able to resolve this issue by increasing the per process memory limit in the WHM Tweak Settings feature, or by running EasyApache from the command line to minimize its memory footprint.


Problems building Apache with your custom modules

If you have problems building Apache with your custom modules, and you are unable to troubleshoot the problem, run

/scripts/easyapache –skip-custom-optmods

This builds Apache and PHP without any custom modules.

From WHM

Access the WHM equivalent found in EasyApache’s Help section.

In order to remove a custom module from the server, simply delete the files you have created when you issued the above commands. The module will be removed from all future builds and the EasyApache interface.


Next »