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

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

Correct way of installing VirtualBox Guest Additions in Kali Linux 2016.2/2017 (Kali Rolling)

How to install VirtualBox Guest Additions in Kali Linux (Kali Rolling / Kali Linux 2016.2 / Kali 2017)

Since Kali Linux 2016 came out (also known as Kali Rolling), it seems that Official …

Changing GRUB timeout in Kali Linux - blackMORE Ops -4

Changing GRUB timeout in Kali Linux

I use Kali Linux alongside my Windows in my Laptop (yes I do use Windows …

Leave a Reply

Your email address will not be published. Required fields are marked *