如何检查在 apache 中启用的 mod_headers 和 mod_expires 模块 [英] How to check mod_headers and mod_expires modules enabled in apache
本文介绍了如何检查在 apache 中启用的 mod_headers 和 mod_expires 模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想检查我的服务器中是否启用了 mod_headers 和 mod_expires 模块
I want to check whether mod_headers and mod_expires modules enabled or not in my server
有没有办法使用一些php函数来列出apache启用/禁用的模块,就像我们用phpinfo();函数列出php信息一样?
Is there a way available to list apache enabled/disabled modules using some php function just like we list php information with phpinfo(); function?
推荐答案
在 Debian 上:
On Debian:
user@machine:~$ /usr/sbin/apache2 -l
大多数 GNU/Linux 发行版:
Most GNU/Linux distros:
user@machine:~$ /usr/sbin/httpd -l
Ubuntu:
user@machine:~$ ls /etc/apache2/mods-enabled
在 Mac OSX 上:
On Mac OSX:
user@mymac:~$ httpd -l
在 Win 7(64 位)上:
On Win 7 (64-bit):
C:\Users\myuser>"\Program Files (x86)\Apache Software Foundation\Apache2.2\bin\httpd.exe" -l
在除 Windows 之外的所有终端窗口中尝试这些命令,它将使用 CMD.
Try these commands from a terminal window in all but Windows, which will use CMD instead.
这篇关于如何检查在 apache 中启用的 mod_headers 和 mod_expires 模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文