On more recent iterations of Debian and Ubuntu there is also the a2query command:
a2query -m
authz_host (enabled by maintainer script)
ssl (enabled by site administrator)
...
Usage:
Usage: /usr/sbin/a2query -q -m [MODULE] -s [SITE] -c [CONF] -a -v -M -d -h
-q suppress any output. Useful for invocation from scripts
-m [MODULE] checks whether the module MODULE is enabled, lists all enabled
modules if no argument was given
-s [SITE] checks whether the site SITE is enabled, lists all sites if no
argument was given
-c [CONF] checks whether the configuration CONF is enabled, lists all
configurations if no argument was given
-a returns the current Apache 2 module magic version
-v returns the current Apache 2 version
-M returns the enabled Apache 2 MPM
-d returns the Apache 2 module directory
-h display this help
The above answers are old and no longer work for my modern Fedora Server 31 / 32 and Apache 2.4.
Here's what does:
httpd -t -D DUMP_MODULES
But, there is a caveat that this will only work if you have an appropriately configured /etc/httpd/conf/httpd.conf, so if you're in the middle of editing to set LogLevel, it won't work if your edits are in-progress and not valid!
To list apache loaded modules use:
or:
or on RHEL,CentoS, Fedora:
For more options
man apachectl
. All these answers can be found just by little google search.Also you can use server-info to get info from remote servers
You can get list of all enabled Apache modules at http://your.host.example.com/server-info?list
You need to enable the info module:
After restart:
will provide a long list of modules, and configuration info.
To view from remote servers, you can change the 'Requires' option in /etc/apache2/mods-available/info.conf to allow remote servers to view info.
On more recent iterations of Debian and Ubuntu there is also the
a2query
command:Usage:
This works also:
The above answers are old and no longer work for my modern Fedora Server 31 / 32 and Apache 2.4.
Here's what does:
But, there is a caveat that this will only work if you have an appropriately configured /etc/httpd/conf/httpd.conf, so if you're in the middle of editing to set LogLevel, it won't work if your edits are in-progress and not valid!
Ubuntu 22.04 LTS:
After restart: