Bootstrap FreeKB - Apache (Web Server) - Display loaded modules using the apachectl command
Apache (Web Server) - Display loaded modules using the apachectl command

Updated:   |  Apache (Web Server) articles

The apachectl command with the -M flag can be used to display the modules that are currently loaded.

<web_server_root>/bin/apachectl -M

 

Or, the -t -D DUMP_MODULES options can be used.

<web_server_root>/bin/apachectl -t -D DUMP_MODULES

 

Likewise, if you are running an HTTPD web server, the httpd command can be used.

<web_server_root>/bin/httpd -M

 

If you have multiple web server configuration files (e.g. httpd.conf), the -f option can be used to point to a specific httpd.conf file.

<web_server_root>/bin/apachectl -f <web_server_root>/conf/httpd.conf -M

 

Which should return something like this.

Loaded Modules:
 core_module (static)
 so_module (static)
 http_module (static)
 reqtimeout_module (shared)
 mpm_worker_module (shared)
 unixd_module (shared)
 authz_host_module (shared)
 authz_core_module (shared)
 authn_core_module (shared)
 auth_basic_module (shared)
 authn_file_module (shared)
 authz_user_module (shared)
 include_module (shared)
 log_config_module (shared)
 env_module (shared)
 headers_module (shared)
 unique_id_module (shared)
 setenvif_module (shared)
 mime_module (shared)
 autoindex_module (shared)
 cgid_module (shared)
 dir_module (shared)
 actions_module (shared)
 alias_module (shared)
 status_module (shared)
 mpmstats_module (shared)
 backtrace_module (shared)
 whatkilledus_module (shared)

 

The httpd.conf file will contain a line for each module.

LoadModule core_module modules/core_module.so
LoadModule so_module   modules/so_module.so
LoadModule http_module modules/http_module.so

 

And the module .so files should be in the modules directory.

<web_server_root>/modules/core_module.so
<web_server_root>/modules/so_module.so
<web_server_root>/modules/http_module.so

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter e0fcdd in the box below so that we can be sure you are a human.