How to check mod_headers and mod_expires modules enabled in apache

北慕城南 提交于 2019-11-30 03:44:35
speeves

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.

All the above answers are wrong. Use instead:

apachectl -t -D DUMP_MODULES

or

apachectl -M

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

/etc/apache2/mods-enabled

Some versions of PHP/Apache show all loaded modules in phpinfo() under "Loaded Modules".

Speeve's answer shows compiled in modules (x6 on my system):

echo system('/usr/sbin/apache2 -l');

You'll also need to see your enabled modules (x36 for me):

echo system('ls /etc/apache2/mods-enabled/');

To get the list of disabled modules, run this command then cross off all the enabled modules:

echo system('ls /etc/apache2/mods-available/');
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!