How to Check Which Apache Modules are Enabled/Loaded in Ubuntu 16.04


Apache is an open supply program on hand without cost. It runs on 67% of all web servers. It is speedy, risk-free, and comfortable. It may be extremely custom-made to satisfy the wants of many one-of-a-kind environments via utilizing extensions and modules.

To install apache, use the following commands-

$ sudo apt-get update
$ sudo apt-get install apache2

apache2ctl

apcahe2ctl is a front end to the Apache HyperText switch Protocol (HTTP) server. It is designed to aid an administrator to control the functioning of the Apache HTTP daemon. To get the more information about apache2 modules, use the following command –

$ man apache2ctl
or
$ apache2ctl -h

The sample output should be like this –

Usage: /usr/sbin/apache2 [-D name] [-d directory] [-f file]
                         [-C "directive"] [-c "directive"]
                         [-k start|restart|graceful|graceful-stop|stop]
                         [-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S] [-X]
Options:
-D name                   : define a name for use in directives
-d directory              : specify an alternate initial ServerRoot
-f file                   : specify an alternate ServerConfigFile
-C "directive"            : process directive before reading config files
-c "directive"            : process directive after reading config files
-e level                  : show startup errors of level (see LogLevel)
-E file                   : log startup errors to file
-v                        : show version number
-V                        : show compile settings
-h                        : list available command line options (this page)
-l                        : list compiled in modules
-L                        : list available configuration directives
-t -D DUMP_VHOSTS         : show parsed vhost settings
-t -D DUMP_RUN_CFG        : show parsed run settings
-S                        : a synonym for -t -D DUMP_VHOSTS -D DUMP_RUN_CFG
-t -D DUMP_MODULES        : show all loaded modules
-M                        : a synonym for -t -D DUMP_MODULES
-t                        : run syntax check for config files
-T                        : start without DocumentRoot(s) check
-X                        : debug mode (only one worker, do not detach)

Modules information

To get the information about which Apache Modules are Enabled/Loaded in Ubuntu 16.04, use the following command –

$ apache2ctl -M

The sample output should be like this –

[Mon Jan 02 12:04:29.210625 2017] [so:warn] [pid 14538] AH01574: module dav_module is already loaded, skipping
Loaded Modules:
core_module (static)
so_module (static)
watchdog_module (static)
http_module (static)
log_config_module (static)
logio_module (static)
version_module (static)
unixd_module (static)
access_compat_module (shared)
alias_module (shared)
auth_basic_module (shared)
authn_core_module (shared)
authn_file_module (shared)
authz_core_module (shared)
authz_host_module (shared)
dav_module (shared)
dav_svn_module (shared)
authz_svn_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgi_module (shared)
cgid_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
filter_module (shared)
include_module (shared)
mime_module (shared)
mpm_prefork_module (shared)
negotiation_module (shared)
php7_module (shared)
rewrite_module (shared)
setenvif_module (shared)
status_module (shared)

List of Modules in alphabetical order

If you want to view the list in alphabetical order, use the following command –

$ apachectl -M | sort

The sample output should be like this –

[Mon Jan 02 12:08:33.025558 2017] [so:warn] [pid 14575] AH01574: module dav_module is already loaded, skipping
access_compat_module (shared)
alias_module (shared)
auth_basic_module (shared)
authn_core_module (shared)
authn_file_module (shared)
authz_core_module (shared)
authz_host_module (shared)
authz_svn_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgid_module (shared)
cgi_module (shared)
core_module (static)
dav_module (shared)
dav_svn_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
filter_module (shared)
http_module (static)
include_module (shared)
Loaded Modules:
log_config_module (static)
logio_module (static)
mime_module (shared)
mpm_prefork_module (shared)
negotiation_module (shared)
php7_module (shared)
rewrite_module (shared)
setenvif_module (shared)
so_module (static)
status_module (shared)
unixd_module (static)
version_module (static)
watchdog_module (static)

Modules information

Another simple way to get the list of Apache Modules are Enabled/Loaded as shown below –

$ apachectl -t -D DUMP_MODULES

The sample output should be like this –

[Mon Jan 02 12:12:18.015390 2017] [so:warn] [pid 14641] AH01574: module dav_module is already loaded, skipping
Loaded Modules:
core_module (static)
so_module (static)
watchdog_module (static)
http_module (static)
log_config_module (static)
logio_module (static)
version_module (static)
unixd_module (static)
access_compat_module (shared)
alias_module (shared)
auth_basic_module (shared)
authn_core_module (shared)
authn_file_module (shared)
authz_core_module (shared)
authz_host_module (shared)
dav_module (shared)
dav_svn_module (shared)
authz_svn_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgi_module (shared)
cgid_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
filter_module (shared)
include_module (shared)
mime_module (shared)
mpm_prefork_module (shared)
negotiation_module (shared)
php7_module (shared)
rewrite_module (shared)
setenvif_module (shared)
status_module (shared)

List of modules in alphabetical order

If you want to view the list in alphabetical order, use the following command –

$ apachectl -t -D DUMP_MODULES | sort

The sample output should be like this –

[Mon Jan 02 12:13:59.845909 2017] [so:warn] [pid 14657] AH01574: module dav_module is already loaded, skipping
access_compat_module (shared)
alias_module (shared)
auth_basic_module (shared)
authn_core_module (shared)
authn_file_module (shared)
authz_core_module (shared)
authz_host_module (shared)
authz_svn_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgid_module (shared)
cgi_module (shared)
core_module (static)
dav_module (shared)
dav_svn_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
filter_module (shared)
http_module (static)
include_module (shared)
Loaded Modules:
log_config_module (static)
logio_module (static)
mime_module (shared)
mpm_prefork_module (shared)
negotiation_module (shared)
php7_module (shared)
rewrite_module (shared)
setenvif_module (shared)
so_module (static)
status_module (shared)
unixd_module (static)
version_module (static)
watchdog_module (static)

In the above article, we have learnt – Learn how to Check Which Apache Modules are Enabled/Loaded in Ubuntu 16.04. In our next articles, we will come up with more Linux based tricks and tips. Keep reading!

karthikeya Boyini
karthikeya Boyini

I love programming (: That's all I know

Updated on: 29-Feb-2024

232 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements