Apache 基於模塊化理念構建,管理員可透過不同模塊擴展功能、增強性能。本文說明如何列出並查看已啟用的 Apache 模塊。
常見模塊包括:mod_ssl(HTTPS)、mod_rewrite(URL 重寫)、mod_security(防暴力破解與 DDoS)、mod_status(負載與頁面統計監測)等。

apachectl / apache2ctl 是控制 Apache 的前端,可查看說明:
$ apache2ctl help 或 $ apachectl help
它可工作在 SysV init 模式或直通模式。啟動並查看狀態:
$ sudo apache2ctl start $ sudo apache2ctl status
-t -D DUMP_MODULES 是顯示所有已啟用模塊的參數(等同 -M):
# Debian 系 $ apache2ctl -t -D DUMP_MODULES 或 $ apache2ctl -M # RHEL 系 $ apachectl -t -D DUMP_MODULES 或 $ httpd -M
輸出會列出 core_module、mpm_prefork_module、auth_basic_module、ldap_module 等已載入模塊。