Question : Recently, I was learning how to secure Apache web server guide – in which one of the suggestion was to load only necessary modules in Apache, as that will reduce the server load and improves the web server security as well. I would like to know if there’s any command that will list all the modules that are enabled or loaded in Apache? I’m using RedHat enterprise Linux.
Solution: List all Modules Loaded or Enabled in Apache httpd
Yes, there’s a command to list all the modules loaded by Apache.
$apachectl -t -D DUMP_MODULES
$ apache2ctl -M
Alternatively, you can verify the modules that are loaded in httpd configuration files.
# vi /etc/httpd/conf/httpd.conf
Also verify the files inside ‘/etc/httpd/conf.d/‘ and lookout for ‘LoadModule‘.
Similarly, PHP will load lot of modules. The below command will display all modules loaded by PHP.