Installing Apache Extension in WHM

This step-by-step tutorial will help you harness the full potential of Installing Apache extension in whm

Even PHP is our main topic for discussion today, we know that not only PHP do whole dynamic website development, but it requires the help of other software too. Here comes the picture of the LAMP stack, the stack is used to build dynamic and interactive websites.

Stack is simply a term which is used for a group of software that is collectively used to perform certain task here we are interested in dynamic web-application development. LAMP is an acronym for a set of open-source software that is

• Linux Operating System
• Apache HTTP Server
• MySQL database management system
• PHP programming language

Linux operating system manages all operations regarding applications, Apache web server handles all the HTTP requests while MySQL manages all the database which contains data associated with the application. PHP acts as a scripting language for dynamic web content. The lamp stack is easy to use and free. In today’s discussion, we are going to concentrate only on Apache and PHP.

PHP stands for Hypertext Preprocessor. It is a server-side scripting language (scripting language is mostly used to do routine tasks for an application) that is used for developing static/dynamic website content. PHP code is embedded into HTML code. PHP uses tags like HTML. Some of the great features of PHP are

• PHP is open-source and free
• It is cross-platform
• PHP is a server-side scripting
• It works flawlessly with MySQL
• PHP has a regular update which makes it very fast day by day
• It has a large community which is very beneficial to troubleshoot the problem if any

Extensions are one of the most important features of PHP. They are simply a preloaded library of functions that can be used by many applications.
There are already many PHP extensions that are available like standard extensions.

There are a lot of third-party extensions are also available. PECL (PHP Extension Community Library) is one of the best places where you can generate an external module that can be loaded into PHP. We are also having The PHP Extension and Application Repository (PEAR)

By using WHM/cPanel interface we can install the PHP/Apache extension as per our requirement. Follow the procedure given below to enable it through WHM/cPanel

  1. Open and log in to the WHM interface. From the left side, the menu bars select software.
Installing apache extension in whm

2. While selecting software we will get an interface that contains multiple options in front of you, select Module installer and proceed further as below

select module installer
  1. Module installers are having 4 sub-menus simply select PHP extension and application package
Module installers

4. Here you can search for the extension that you want or you can a have list of all available modules. First, you must select the PHP version for which you are going to install the modules/extensions.

There are some inbuilt available extensions/modules whose list is also available and you can update/reinstall/uninstall them as per your choice.

Module installers
  1. When you click on show available modules you will get a list of all available modules. There are totally about 600 packages are available to choose from
Module installers
  1. You can also install extensions from the PHP PECL library as shown below
Module installers

7. When you select PHP PECL, you will get the interface to install the extension

PHP PECL

8. If you are a shared hosting user and wants to install PHP extensions for your project then just login to your cPanel with the help of credentials given by your hosting provider.

Go to the Software menu and select PHP PEAR packages

After selecting PHP PEAR Packages, you will two options either search the required extension or select from all available extensions.

PHP PEAR Packages

When you select system installed modules you will get a list.

Apache is a cross-platform web server run mostly on top of the Linux operating system. This is the most widely used web server on the internet today. Apache is the first choice of shared hosting users.

One of the most important features of apache is its adaptability which is possible due to its modular nature. We can configure and add an apache module as per our requirement. We can also remove unwanted modules to make them faster and responsive.

Apache has different modules for its working some are pre-installed and others can be downloaded and installed as per our requirements. Modules allow apache to carry out different additional tasks. Some of the common modules are

The below list shows some of the commonly used Apache modules that are

• Mod_security
• Mod_rewrite
• Mod_deflate
• Mod_cache
• Mod_proxy
• Mod_ssl

Apache HTTPd supports a wide variety of environments due to its modular design due to which designer is free to choose which feature must be included in the server by selecting the proper module which will be loaded at compile time/run time.

Apache module can be enabled/disabled at WHM only. There are mainly two options by which we can tackle Apache modules these are,

Apache server comes with several inbuilt Multi-Processing Modules (MPM’s). These modules determine how exactly the Apache web-server connect to network ports, accept HTTP requests and dispatch child processes to handle the HTTP requests. It’s very important to take note that one and only one MPM must be loaded into the server at any time.

The default MPMs for different types of operating systems are as follows

The following table will give you the idea about which MPM is best suitable if you are using Unix based operating systems such as Linux, Mac, BSD or Solaris etc.

System parametersDesired MPM module
EventWorkerPrefork
Does the system support threads?✔︎✔︎
Does the system support thread-safe polling?✔︎
Table: How to select proper MPM Module

If we don’t select the MPM version then Apache will select prefork as the default module. cPanel and WHM support systems that are having threads and safe-thread polling.

To extend the core functionality of apache, a large number of additional modules are available to enable. The default profile in cPanel includes some of the most required apache modules these are

• mod_cgi — Handles CGI requests.
• mod_deflate — Compresses content before delivery to the client.
• mod_expires — Generates Expires and Cache-Control HTTP headers with user-specified criteria.
• mod_headers — Customization of HTTP request and response headers.
• mod_mpm_prefork — Implements a non-threaded, pre-forking web server.
• mod_proxy— HTTP/1.1 proxy/gateway server.
• mod_proxy_fcgi — FastCGI proxy module for the Apache HTTP server.
• mod_ruid2 — Allows a domain’s HTTP requests to run as the owner of that domain
• mod_security2 — A web application firewall. For more information, read our Apache Module: ModSecurity® documentation.
• mod_ssl — Handles security through the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) protocols.
• mod_unique_id — Provides an environment variable with a unique identifier for each request.

We can also select other apache modules as per our requirements from

  1. login to WHM and select software from the left side menu bar

2. Select Easy Apache 4 from the list of available submenus

easy apache 4

3. Select customize to edit the profile as per your requirements

4. Go to Apache MPM to enable/disable the MPM module as discussed above

easy apache 4

5. To enable the module for the working of apache simply select Apache Modules to enable/ disable the modules

Read More Related Blogs

“Buy Dedicated Hosting and Get 55% OFF on Your First Order on a Yearly Plan”

No Promocode Required.

Scroll to Top