A2QUERY.IN(1)
π A2QUERY.IN(1) β the a2query girlie's guide π
okay bestie, so this is a2query, a little section-1 manual page, and honestly? she's serving runtime config realness and I'm obsessed. β¨
πΈ NAME πΈ
a2query β go grab the runtime configuration from a local Apache 2 HTTP server. that's it, that's the job. π«Ά
β¨ SYNOPSIS β¨
a2query [-m [MODULE]] [-s [SITE]] [-c [CONF]] [-a] [-v] [-M] [-d] [-h]
like... look at her. all those lil flags. iconic π
π¦ DESCRIPTION π¦
so a2query is a program whose whole entire personality is retrieving configuration values from a locally available Apache 2 HTTP web server. and the way it was designed?? it was designed to be as robust as possible, which means it'll hand you back feasible values even if the Apache 2 syntax validator totally flops and fails. π resilience queen fr fr.
and listen β this program is primarily meant to be used from maintainer scripts. so she's not here for the vibes, she's here for the automation. periodt.
π OPTIONS π
-aβ returns the Apache 2"Module Magic Version"(API version) number that the server was compiled with. and no cap: the version it gives you does not contain any minor versions that are known to be compatible with the major version returned. so don't go looking for them, they're not there. π-c [CONF]β checks whether the configurationCONFis enabled. if you gave no argument at all? it just returns all the enabled configuration files, all of them, the whole lineup. β¨ andCONFgets compared by string comparison, ignoring a leading"mod_"prefix and possibly a.confor.loadsuffix. so like, she's flexible about your naming, she's not gonna be weird about it. π-hβ displays a brief summary of how the program can be called, then exits. the lil "hey here's how you talk to me" moment. π-m [MODULE]β checks whether the moduleMODULEis enabled. and the argument? it's interpreted the same way as for configuration files queried by the-cswitch. consistency, we love to see it. π«Ά-Mβ returns the currently enabled Apache 2 MPM (Multi Processing Module). capital M, capital energy. π₯-s [SITE]β checks whether the moduleSITEis enabled. (yes bestie, the original says "module" here, I'm just the messenger π) the argument is interpreted in the same way as for configuration files queried by the-cswitch. same rules, same girl. πΈ-vβ returns the currently installed Apache 2 HTTP server version. lowercase v, lowercase vibes, still valid. β-qβ suppresses any output. this is useful to invokea2queryfrom another script. this is useful if only the return code is of interest. two whole sentences of usefulness, we're eating well. π
π EXIT CODES π
okay this part actually matters, so pay attention bestie. π
a2query returns with a zero (0) exit status if the requested operation was effectuated successfully, and with a non-zero status otherwise.
and in case of an error, she leaves with:
- error code
32if a requested module, site or configuration was not found - error code
33if a module, site or configuration was disabled by a maintainer script - and however, exit status
1is returned if the module was not found at all
β οΈ yeah,1and32are both "couldn't find it" flavours, and that's not a typo, that's just how she is. check the codes, don't assume. π
π§ SEE ALSO π§
apache2ctl(8), apache2(8), perl(1) β go read your other favs too, they're all linked up. π¦
π AUTHOR π
this manual and a2query was written by Arno Toell <debian@toell.net>. shoutout to the author, fr fr, thank you for your service. π«Ά
aaaand that's the whole page bestie!! π this was the perl v5.40.1 version, dated 2026-10-01 β so go forth, query your Apache, and remember: runtime configuration is a love language. mwah. πβ¨π
π¦ where this page comes from
- debian trixie: apache2 2.4.69-1~deb13u1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms