{
    "mode": "man",
    "parameter": "a2query",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/a2query/1/json",
    "generated": "2026-05-30T05:09:53Z",
    "synopsis": "a2query  [-m [MODULE]] [-s [SITE]] [-c [CONF]] [-a] [-v] [-M] [-d] [-h]",
    "sections": {
        "NAME": {
            "content": "a2query - retrieve runtime configuration from a local Apache 2 HTTP server\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "a2query  [-m [MODULE]] [-s [SITE]] [-c [CONF]] [-a] [-v] [-M] [-d] [-h]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "a2query is a program designed to retrieve configuration values from a locally available\nApache 2 HTTP web server. It was designed to be as robust as possible by returning feasible\nvalues even if the Apache 2 syntax validator fails.\n\nThis program is primarily meant to be used from maintainer scripts.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "-a  Returns the Apache 2 \"Module Magic Version\" (API version) number, the server was compiled\nwith. The returned version does not contain any minor versions which are known to be\ncompatible with the major version returned.\n",
            "subsections": [
                {
                    "name": "-c [_CONF_]",
                    "content": "Checks whether the configuration CONF is enabled. If no argument was given, all enabled\nconfiguration files are being returned. CONF is compared by string comparison by ignoring\na leading \"mod\" prefix and possibly a '.conf' or '.load' suffix.\n\n-h  Displays a brief summary how the program can be called and exits.\n",
                    "flag": "-c",
                    "arg": "[_CONF_]"
                },
                {
                    "name": "-m [_MODULE_]",
                    "content": "Checks whether the module MODULE is enabled, The argument is interpreted in the same way,\nas for configuration files queried by the -c switch.\n\n-M  Returns the currently enabled Apache 2 MPM (Multi Processing Module).\n",
                    "flag": "-m",
                    "arg": "[_MODULE_]"
                },
                {
                    "name": "-s [_SITE_]",
                    "content": "Checks whether the module SITE is enabled, The argument is interpreted in the same way,\nas for configuration files queried by the -c switch.\n\n-v  returns the currently installed Apache 2 HTTP server version\n\n-q  suppress any output. This is useful to invoke a2query from another script. This is useful\nif only the return code is of interest.\n",
                    "flag": "-s",
                    "arg": "[_SITE_]"
                }
            ]
        },
        "EXIT CODES": {
            "content": "a2query returns with a zero (0) exit status if the requested operation was effectuated\nsuccessfully and with a non-zero status otherwise. In case of an error it leaves with error\ncode 32 if a requested module, site or configuration was not found and 33 if a module, site\nor configuration was disabled by a maintainer script. However, exit status 1 is returned if\nthe module was not found at all\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "apache2ctl(8), apache2(8), perl(1)\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "This manual and a2query was written by Arno Toell <debian@toell.net>.\n\n\n\nperl v5.34.0                                 2026-05-05                                A2QUERY.IN(1)",
            "subsections": []
        }
    },
    "summary": "a2query - retrieve runtime configuration from a local Apache 2 HTTP server",
    "flags": [
        {
            "flag": "-c",
            "long": null,
            "arg": null,
            "description": "Checks whether the configuration CONF is enabled. If no argument was given, all enabled configuration files are being returned. CONF is compared by string comparison by ignoring a leading \"mod\" prefix and possibly a '.conf' or '.load' suffix. -h Displays a brief summary how the program can be called and exits."
        },
        {
            "flag": "-m",
            "long": null,
            "arg": null,
            "description": "Checks whether the module MODULE is enabled, The argument is interpreted in the same way, as for configuration files queried by the -c switch. -M Returns the currently enabled Apache 2 MPM (Multi Processing Module)."
        },
        {
            "flag": "-s",
            "long": null,
            "arg": null,
            "description": "Checks whether the module SITE is enabled, The argument is interpreted in the same way, as for configuration files queried by the -c switch. -v returns the currently installed Apache 2 HTTP server version -q suppress any output. This is useful to invoke a2query from another script. This is useful if only the return code is of interest."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "apache2ctl",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/apache2ctl/8/json"
        },
        {
            "name": "apache2",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/apache2/8/json"
        },
        {
            "name": "perl",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/perl/1/json"
        }
    ]
}