Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check mod_headers and mod_expires modules enabled in apache

I want to check whether mod_headers and mod_expires modules enabled or not in my server

Is there a way available to list apache enabled/disabled modules using some php function just like we list php information with phpinfo(); function?

like image 264
Giri Avatar asked Jan 09 '12 20:01

Giri


2 Answers

All the above answers are wrong. Use instead:

apachectl -t -D DUMP_MODULES

or

apachectl -M

like image 126
noun Avatar answered Sep 22 '22 19:09

noun


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.

like image 36
speeves Avatar answered Sep 25 '22 19:09

speeves