日期:2014-05-16 浏览次数:20852 次
关于Apache性能监控配置 server-status balancer-manager server-info
从网上搜到得配置如下
修改 Apache2.2\conf\httpd.conf 配置文件
第一、加载mod_status.so,mod_info.so模块
#LoadModule status_module modules/mod_status.so
#LoadModule info_module modules/mod_info.so
去掉#
在该文件末尾加入以下:
<Location /server-status> SetHandler server-status Order Deny,Allow Deny from all Allow from 127.0.0.1 </Location>
<Location /server-info> SetHandler server-info Order deny,allow Deny from all Allow from 127.0.0.1 </Location>
Apache Server Status for 127.0.0.1 Server Version: Apache/2.2.25 (Win32) Server Built: Jul 10 2013 01:52:12 Current Time: Thursday, 27-Mar-2014 16:34:26 ?D1ú±ê×?ê±?? Restart Time: Thursday, 27-Mar-2014 16:05:22 ?D1ú±ê×?ê±?? Parent Server Generation: 6 Server uptime: 29 minutes 4 seconds 3 requests currently being processed, 147 idle workers
apache starts to forward server-status requests to tomcat that returns 404 Unable to access server-status and server-info page (status 404) a 404 Not Found is reported
<Proxy balancer://tomcatcluster> BalancerMember ajp://localhost:8509 route=a BalancerMember ajp://10.1.32.234:8510 route=b BalancerMember ajp://localhost:8510 route=c </Proxy>
#apache监控 #过滤server-stauts监控页面 ProxyPass /server-status ! #过滤balancer-manager监控页面 ProxyPass /balancer-manager !
最终配置效果如下:
#apache监控 #过滤server-stauts监控页面 ProxyPass /server-status ! #过滤balancer-manager监控页面 ProxyPass /balancer-manager ! #设置server-stauts监控页面 <Location /server-status> SetHandler server-status Order Deny,Allow Deny from all Allow from 127.0.0.1 </Location> #设置ba