a2query -m
authz_host (enabled by maintainer script)
ssl (enabled by site administrator)
...
用法:
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
要列出 apache 加载的模块,请使用:
或者:
或者在 RHEL、CentoS、Fedora 上:
更多选择
man apachectl
。所有这些答案都可以通过一点谷歌搜索找到。您也可以使用server- info 从远程服务器获取信息
您可以在http://your.host.example.com/server-info?list获取所有启用的 Apache 模块的列表
您需要启用信息模块:
重启后:
将提供一长串模块和配置信息。
要从远程服务器查看,您可以更改 /etc/apache2/mods-available/info.conf 中的“Requires”选项以允许远程服务器查看信息。
在最近的 Debian 和 Ubuntu 迭代中,还有以下
a2query
命令:用法:
这也适用:
上面的答案是旧的,不再适用于我的现代 Fedora Server 31 / 32 和 Apache 2.4。
这是做什么的:
但是,有一个警告,只有当你有一个适当配置的 /etc/httpd/conf/httpd.conf 时,这才会起作用,所以如果你正在编辑设置 LogLevel,如果你的编辑它不会起作用正在进行中且无效!
Ubuntu 22.04 长期支持版:
重启后: