On this page 6 sections
In this manual, you will learn how to identify which modules are active on your Apache HTTP Server using the terminal. It is a quick and fundamental process for administration, debugging, and advanced configuration tasks.
Prerequisites
Before starting, make sure of the following:
- Have terminal access to your server.
- Have administrator permissions (
rootuser or withsudo). - Have Apache installed on the system.
If you do not yet have a Linux server ready to use, you can easily deploy one with providers such as SW Hosting in a matter of minutes.
View active modules on Debian/Ubuntu systems
In Debian-based distributions, you can list the currently loaded modules with the following command:
apache2ctl -M
What does this command do?
apache2ctl: Apache control tool.-M: shows all modules loaded in memory.
This list includes static and dynamic modules active at that moment.
View active modules on Red Hat / CentOS systems
In Red Hat-based systems, the equivalent command is:
httpd -M
Details
httpd: the main binary of the Apache server in these distributions.-M: lists the currently loaded modules.
View all available modules (Debian/Ubuntu)
If you need to see all installed modules (active or not), you can check the corresponding directory:
ls /etc/apache2/mods-available
Useful information
- This directory contains all the modules you can enable or disable.
- Active modules are usually linked in
/etc/apache2/mods-enabled.
View all available modules (Red Hat / CentOS)
In Red Hat distributions, you can check the available modules with:
ls /etc/httpd/mods-available
Note: In some versions of Red Hat, modules can be found in paths such as /etc/httpd/conf.modules.d/.
Final recommendations
-
Use
grepto filter specific modules:apache2ctl -M | grep rewrite -
Always verify changes by restarting the service:
systemctl restart apache2 # Debian/Ubuntu systemctl restart httpd # Red Hat/CentOS
Continue with these manuals
- Connect to a server via SSH with Windows DevOps · updated on 17 Nov 2026
- Install WordPress on VestaCP with SSL (Let's Encrypt) DevOps · updated on 17 Nov 2026
- How to activate a Bearer Token for API access DevOps · updated on 17 Nov 2026
- How to change the permissions of a file or directory in Linux DevOps · updated on 17 Nov 2026