How to check mod_headers and mod_expires modules enabled in apache

On Ubuntu you can see the list of enabled modules here,

/etc/apache2/mods-enabled

All the above answers are wrong. Use instead:

apachectl -t -D DUMP_MODULES

or

apachectl -M


On Debian:

user@machine:~$ /usr/sbin/apache2 -l

Most GNU/Linux distros:

user@machine:~$ /usr/sbin/httpd -l

Ubuntu:

user@machine:~$ ls /etc/apache2/mods-enabled

On Mac OSX:

user@mymac:~$ httpd -l

On Win 7 (64-bit):

C:\Users\myuser>"\Program Files (x86)\Apache Software Foundation\Apache2.2\bin\httpd.exe" -l

Try these commands from a terminal window in all but Windows, which will use CMD instead.