apache加入mod_status,mod_info 监控Server状态
apache模块学习笔记系列–mod_status,mod_info
环境:WinXP,Appserv2.5.9(Apache/2.2.4 (Win32) PHP/5.2.3 Server at 127.0.0.1 Port 82) 安装路径:D:\AppServ\
第一、加载mod_status.so,mod_info.so模块
#LoadModule status_module modules/mod_status.so
#LoadModule info_module modules/mod_info.so
去掉#,加载mod_status.so,mod_info.so
第二、httpd.conf文件增加Include conf/extra/httpd-info.conf ,引入mod_status.so,mod_info.so的配置文件。
httpd-info.conf:
#
# Get information about the requests being processed by the server
# and the configuration of the server.
#
# Required modules: mod_status (for the server-status handler),
# mod_info (for the server-info handler)
#
# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
# Change the “.appservnetwork.com” to match your domain to enable.
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from all
</Location>
#
# ExtendedStatus controls whether Apache will generate “full” status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the “server-status” handler is called. The default is Off.
#
#ExtendedStatus On
#
# Allow remote server configuration reports, with the URL of
# http://servername/server-info (requires that mod_info.c be loaded).
# Change the “.appservnetwork.com” to match your domain to enable.
#
<Location /server-info>
SetHandler server-info
Order deny,allow
Deny from all
Allow from all
</Location>
第三、URL进行访问
1、http://127.0.0.1:82/server-status
http://127.0.0.1:82/server-status?refresh=N访问状态页面可以每N秒自动刷新一次。
http://127.0.0.1:82/server-status?auto 获得一个面向机器可读的状态文件
2、http://127.0.0.1:82/server-info
转自:http://hi.baidu.com/longhtml/item/219523610cca6e90c5d249fa?qq-pf-to=pcqq.c2c
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/71323.html