1.开启mod_status.so 模块
cd /usr/local/apache/conf
vi httpd.conf
找到LoadModule status_module modules/mod_status.so去掉前面的#(默认没有,如果有就去掉)
2.配置server-status服务
方法一:
在httpd.conf加入
<location /c-server-status>
SetHandler server-status
Order Deny,Allow
Deny from nothing
Allow from all
</location>方法二:
找到#Include conf/extra/httpd-info.conf去掉前面的#
打开...apache2\conf\extra\http-info.conf 配置文件进行修改。修改内容与方式一相同。
3.验证服务是否开启
访问 http://你的ip/server-status 输出如下则证明开启成功
本文介绍如何通过配置Apache服务器启用mod_status.so模块实现服务器状态监控。主要包括:开启模块、配置server-status服务两种方法及验证服务是否成功开启。
368

被折叠的 条评论
为什么被折叠?



