List Loaded/Enabled Apache Modules

How to list installed Apache modules - is a common question as it is very often required to check which Apache modules are loaded/enabled.

List of installed Apache modules can be found using special option for httpd/apachectl or apache2/apache2ctl commands (depending on you distribution).

-M option lists all loaded/enabled static (statically compiled into the httpd binary) and shared (compiled as dynamic shared objects that exist separately from the main httpd binary) Apache modules.

Read more: List All VHosts in Apache

List Enabled Modules in HTTPD

Get a list of all loaded/enabled modules in HTTPD on RHEL, CentOS, Fedora etc.:

$ httpd -M
$ apachectl -M

List Loaded Modules in Apache2

Get a list of all loaded/enabled modules in Apache2 on Ubuntu, Debian, Linux Mint etc.:

$ apache2 -M
$ apache2ctl -M

In the output of the above commands you'll see all currently loaded/enabled modules and the result of a syntax check:

Loaded Modules:
 core_module (static)
 mpm_prefork_module (static)
 http_module (static)
 so_module (static)
 auth_basic_module (shared)
 cgi_module (shared)
 version_module (shared)
 wsgi_module (shared)
Syntax OK