How to check mod_headers and mod_expires modules enabled in apache

前端 未结 4 2065
渐次进展
渐次进展 2020-12-25 12:28

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 p

4条回答
  •  情书的邮戳
    2020-12-25 13:01

    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/');
    

提交回复
热议问题