Problem :
Which is the most elegant way to check which apache modules are enabled?
Solution :
You’re on Ubuntu so try:
apache2ctl -M
httpd -M
will tell you which modules are built-in or shared.
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
.
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/