which is the most elegant way to check which apache modules are enabled?
Found answer on the interwebs so for anyone still looking.
Nothing from above answers works if you can't run commands on remote server. If you have only "user" privileges or none at all try creating test.php script:
Though it will work only if PHP is installed as mod_php.
I think there are actually three questions here. I'm not sure which you're asking.
This would be (usually) in the modules directory of your apache distribution, usually /etc/httpd/modules/
This can be checked with /usr/sbin/httpd -M, at least for the base system apache. If you want to check on a specific config file /usr/sbin/httpd -M -f /path/to/config/file
To get a lot of info, you can see it with http://machinename/server-info/ This isn't configured by default, you'd have to configure it in. Its a bit of an info leak, so configure it so only local people can see it.
If you're on the machine and you have access to be the running user, you can also see what's loaded by checking the process. You can find the parent process with:
Then check out