How to check loaded and compiled modules in Apache in Linux?

This is a very common question and sometimes hard to find answer. How do you check which Apache modules are loaded in your HTTP / Apache server? How to check loaded and compiled modules in HTTPD in Linux - blackMORE OpsThe second part is, how do you check which modules are compiled and ready to be loaded? Following two commands will show you you can easily check loaded and compiled modules in Apache in any flavor of Linux such as CentOS, Ubuntu, Fedora, RedHat etc.

Find list of loaded modules in Apache

Use the following command to list Loaded modules in your Apache/HTTPD server in Linux

root@centos [~]# httpd -D DUMP_MODULES
(or)
user@centos [~]# sudo httpd -D DUMP_MODULES
(or)
user@ubuntu [~]# sudo apache2 -D DUMP_MODULES

Depending on your Linux distro, you need to use either httpd or apache2. Also use ‘sudo’ if you’re not logged in as root user.

Sample loaded modules in Apache

Loaded Modules:
 core_module (static)
 include_module (static)
 proxy_module (static)
 proxy_connect_module (static)
 http_module (static)
 autoindex_module (static)
 info_module (static)
 cloudflare_module (shared)
 php5_module (shared)
 reqtimeout_module (shared)
 pagespeed_module (shared)
Syntax OK

Find list of compiled modules in Apache

Use the following command to list compiled modules in Apache/HTTPD server in Linux

root@centos [~]# httpd -l
(or)
user@centos [~]# sudo httpd -l
(or)
user@ubuntu [~]# sudo apache2 -l

Depending on your Linux distro, you need to use either httpd or apache2. Also use ‘sudo’ if you’re not logged in as root user.

Sample compiled modules in Apache

Compiled in modules:
 core.c
 mod_include.c
 mod_proxy.c
 mod_proxy_connect.c
 mod_proxy_http.c
 http_core.c
 mod_autoindex.c
 mod_info.c
 mod_actions.c
 mod_alias.c
 mod_rewrite.c
 mod_so.c

Conclusion

Once you know how to check loaded and compiled modules in Apache and have the info handy, you can either enable/disable, load/unload as required. Most Apache servers doesn’t require the full set of modules and by loading more modules you will only make it slower. So just load the ones you think you will need and add more when you get an error or take out one module at time until your server reaches optimal stability.

Check Also

Enabling AMD GPU for Hashcat on Kali Linux: A Quick Guide

Enabling AMD GPU for Hashcat on Kali Linux: A Quick Guide

If you’ve encountered an issue where Hashcat initially only recognizes your CPU and not the …

Boot Ubuntu Server 22.04 LTS from USB SSD on Raspberry Pi 4

Boot Ubuntu Server 22.04 LTS from USB SSD on Raspberry Pi 4

This is a guide for configuring Raspberry Pi4 to boot Ubuntu from external USB SSD …

Leave your solution or comment to help others.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from blackMORE Ops

Subscribe now to keep reading and get access to the full archive.

Continue reading

Privacy Policy on Cookies Usage

Some services used in this site uses cookies to tailor user experience or to show ads.