← 返回命令列表

Linux command

a2query 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Example

sudo a2query -m

Example

sudo a2query -m [module_name]

Example

sudo a2query -s

Example

sudo a2query -M

Example

sudo a2query -v

Example

sudo a2query -c

说明

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.

参数

-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

FAQ

What is the a2query command used for?

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.

How do I run a basic a2query example?

Run `sudo a2query -m` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -m MODULE do in a2query?

Check whether a module is enabled; returns all enabled modules if no argument provided