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.

root@centos ~]# apachectl help

root@ubuntu ~]# apachectl -help

CentOS/RHEL

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

root@centos ~]# 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.

root@centos ~]# apachectl -t -D DUMP_MODULES | grep -i echo

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

root@centos ~]# vim /etc/httpd/conf.modules.d/00-base.conf

LoadModule echo_module modules/mod_echo.so

root@centos ~]# systemctl restart httpd

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

root@centos ~]# 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.

root@ubuntu ~]# apachectl -t -D DUMP_MODULES

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

root@ubuntu ~]# a2enmod ssl

root@ubuntu ~]# systemctl restart apache2