Overview of Apache Modules

Leave your reply

Learn about installing and using Apache modules on a Cloud Server with Linux (CentOS 7 or Ubuntu 16.04). We cover information about popular and useful modules which can extend the functionality of the Apache web server, improve security, increase performance, and more.

Requirements

  • A Cloud Server with Linux
  • Apache web server installed and running

Note: Apache is installed and running on a Standard Linux installation by default. If your server was created with a Minimal installation, you will need to install and configure Apache before you proceed.

View Installed Apache Modules

To list all of the Apache modules which are installed on your server, use the command:

  • CentOS 7:sudo httpd -M
  • Ubuntu 16.04:sudo apache2ctl -M

You can also search for a specific module by piping the results of this command through grep:

  • CentOS 7:sudo httpd -M | grep [search term]
  • Ubuntu 16.04:sudo apache2ctl -M | grep [search term]

For example, the following command could be used to check if mod_evasive is installed on a CentOS 7 system:

sudo httpd -M | grep evasive

For servers with Plesk, Apache modules should always be installed through the Plesk interface when possible. For more information, see our article Add Apache Modules to a Cloud Server with Plesk.

Improve Apache Web Server Performance

Several Apache modules can significantly improve the performance of the Apache web server.

The mod_deflate module speeds up page load times by passing zipped web pages to the client's browser. Learn more about using mod_deflate in our article Configure Apache's mod_deflate to Improve Website Performance.

Several modules are designed to work together to provide caching functionality for Apache. Caching web pages improves server performance, because the server doesn't have to generate a new page for every single request. Learn more about Apache content caching in our article Configure HTTP Content Caching in Apache on Ubuntu 16.04.

For more information on tuning Apache for better performance, see our article 3 Ways to Improve Apache Web Server Performance.

Increase Server Security

There are several methods of improving Apache web server security using Apache modules. The ModSecurity module is a free web application firewall (WAF) which can protect the server against web-based malware and hacking attempts.

Learn more about installing and using ModSecurity in our articles:

The Apache module mod_evasive protects your server against Denial of Service (DoS) and Distributed Denial of Service (DDoS) attacks. Learn how to install and use this Apache module in our article Using the Apache Module mod_evasive.

Extend Apache's Functionality

In addition to improving performance and security, there are many Apache modules which add additional functionality to the Apache web server. Wikipedia maintains a list of Apache modules which includes brief descriptions of each.

Two popular modules are:

mod_wsgi which lets Apache run Python code in a web browser. For more information, see our article Use mod_wsgi to Run Python as a Web Application on CentOS 7.

mod_rewrite which is a powerful and flexible way to enable URL rewriting. For more information, see our article Guide to Apache Redirects.