首先在命令行, 进入 apache 的安装目录, 注意是安装目录.
例如, 我的是 mac 用 brew 安装的, 所以 apahce 的安装文件是在:
/usr/local/cellar/httpd24/2.4.18
进入 bin 目录, 里面装的应该都是一写命令文件.
/usr/local/cellar/httpd24/2.4.18/bin
然后在命令行执行:
apachectl -t -d dump_modules
就会列出 apache 已经加在的模块了.
如下所示:
loaded modules:
core_module (static)
so_module (static)
http_module (static)
mpm_prefork_module (static)
php5_module (shared)
authn_file_module (shared)
authn_core_module (shared)
authz_host_module (shared)
authz_groupfile_module (shared)
authz_user_module (shared)
authz_core_module (shared)
access_compat_module (shared)
auth_basic_module (shared)
reqtimeout_module (shared)
filter_module (shared)
mime_module (shared)
log_config_module (shared)
env_module (shared)
headers_module (shared)
setenvif_module (shared)
version_module (shared)
unixd_module (shared)
status_module (shared)
autoindex_module (shared)
vhost_alias_module (shared)
alias_module (shared)
括号中的意思:
(static): apache 必须加在的模块
(shared): apahce 主配置文件中开启的模块.
以上就介绍了如何查看 apahce 已经加在的模块,包括了方面的内容,希望对php教程有兴趣的朋友有所帮助。