免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2677 | 回复: 0
打印 上一主题 下一主题

[使用帮助] Apache [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-05-16 16:29 |只看该作者 |倒序浏览

Apache配置mod_status

要启用 server-status 必须首先加载 server-status 模块,你可以用以下命令查看是否已经加载了模块:
/usr/local/apache/bin/httpd -l | grep mod_status.c


如果没有安装这个模块,那么就需要您重新编译这个模块了,进入 apache 的源码目录:
cd /usr/local/src/httpd-2.2.14/modules/generators
/usr/local/apache/bin/apxs -cia mod_status.c


这样模块就编译好了。查看一下 apache 的配置文件里已经增加了以下代码:
LoadModule status_module      modules/mod_status.so


启动 server-status 功能,在 apache 的配置文件中增加一下配置代码:
ExtendedStatus On
<Location /server-status>
   SetHandler server-status
   Order Deny,Allow
   Deny from all
   Allow from IP
</Location>





请注意,您需要将OSA的IP加入到Allow from访问列表,确保能正确获取到监控数据。


打开查看的话就使用 http://IP/server-status 来访问,如果需要自动更新, 可以用 http://IP/server-status?refresh=N , N是更新时间,默认是秒。




Apache自定义告警指标

Apache并发连接数(单位:数值)

Apache吞吐量(单位: reqs/s)
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP