How to check which apache modules are enabled/installed?
Which is the most elegant way to check which apache modules are enabled?
Solution 1:
You're on Ubuntu so try:
apache2ctl -M
Solution 2:
httpd -M
will tell you which modules are built-in or shared.
Solution 3:
Nothing from the answers above works if you can’t run commands on a remote server. If you have only “user” privileges or none at all try creating a test.php
script:
<pre>
<?php
print_r(apache_get_modules());
?>
</pre>
Though, it will only work if PHP is installed as mod_php
.
Solution 4:
Maybe this will help for some people on shared hosts with no access to httpd
, apachectl
or processes:
Enabled modules: ls /etc/apache2/mods-enabled/
Available modules: ls /etc/apache2/mods-available/
Solution 5:
You can also use apachectl
apachectl -t -D DUMP_MODULES