Skip to Content

List Apache Modules in Linux

How to list which apache modules are enabled in CentOS/Ubuntu server?

Run below command to find the information for apachectl.

[email protected] ~]# apachectl help

[email protected] ~]# apachectl -help

CentOS/RHEL

Run below command to view the list of enabled modules in CentOS/RHEL.

[email protected] ~]# apachectl -t -D DUMP_MODULES

Refer below example to enable the echo module in CentOS/RHEL

1. Replace the required module name to find if it's enabled on the server. Here I'm using the echo module as an example and it is not enabled on my server.

[email protected] ~]# apachectl -t -D DUMP_MODULES | grep -i echo

2. Edit the module configuration file and append the below line to enable the echo module.

[email protected] ~]# vim /etc/httpd/conf.modules.d/00-base.conf

LoadModule echo_module modules/mod_echo.so

[email protected] ~]# systemctl restart httpd

3. Rerun the below command to confirm the module has been enabled.

[email protected] ~]# apachectl -t -D DUMP_MODULES | grep -i echo

echo_module (shared)

Ubuntu/Debian

Run below command to view the list of enabled modules in Ubuntu/Debian.

[email protected] ~]# apachectl -t -D DUMP_MODULES

Refer below example to enable SSL modules in Ubuntu/Debian.

[email protected] ~]# a2enmod ssl

[email protected] ~]# systemctl restart apache2