a2query
Query Apache2 configuration state
TLDR
List enabled Apache modules
SYNOPSIS
a2query [-m [MODULE]] [-s [SITE]] [-c [CONF]] [-a] [-v] [-M] [-d] [-h]
DESCRIPTION
a2query is a Debian-specific utility designed to retrieve configuration values from a locally installed Apache2 web server. It provides a robust interface primarily intended for use in maintainer scripts but also useful for system administrators.
Arguments for -c, -m, and -s options are compared flexibly, ignoring leading mod_ prefixes and .conf or .load suffixes.
PARAMETERS
-m [MODULE]
Check whether a module is enabled; returns all enabled modules if no argument provided-s [SITE]
Check whether a site is enabled; returns all enabled sites if no argument provided-c [CONF]
Check if a configuration is enabled; returns all enabled configs if no argument provided-M
Returns the current Apache2 MPM (Multi Processing Module)-v
Returns the installed Apache2 version-a
Displays the Apache2 Module Magic Version (API version) number-q
Suppresses output; useful when only return codes matter-h
Shows usage help and exits
CAVEATS
This utility is Debian-specific and not available on other Linux distributions. Exit code 32 indicates the requested module, site, or configuration was not found.
HISTORY
Created as part of the Apache2 package for Debian GNU/Linux. Written by Arno Toell.
