首页 > 代码库 > lighttpd mod_status模块

lighttpd mod_status模块

用过nginx的status可以查看服务器的状态,之后就想lighttpd有没有这样的模块呢

之后看下配置文件,真的有,然后就试下

第一步,

"mod_auth" 把这个前面的#号去掉

第二步

在最后加上 这段配置信息

$HTTP["remoteip"] == "14.144.124.77" {

status.status-url = "/server-status"

status.config-url = "/server-config"

status.statistics-url = "/server-statistics"

status.enable-sort = "enable"

}

然后就就可以啦

上面  "14.144.124.77" 这个ip是我宽带拨号的ip,然后status.status-url = "/server-status" 是访问这个路径的时候可以看到服务器的状态

然后重启lighttpd就可以啦

然后访问浏览器 183.61.16.168:81/server-status 就可以啦

Hostname183.61.16.168:81 ()
Uptime4 min 38 s
Started at2014-09-06 17:25:36
absolute (since start)
Requests2 kreq
Traffic655.15 kbyte
average (since start)
Requests8 req/s
Traffic2.36 kbyte/s
average (5s sliding average)
Requests13 req/s
Traffic4.11 kbyte/s

legend. = connect, C = close, E = hard errorr = read, R = read-POST, W = write, h = handle-requestq = request-start,  Q = request-ends = response-start, S = response-end1 connectionsh

Connections

Client IP:Read:Written:State:Time:Host:URI:File:
14.144.124.770/00/4454handle-req2183.61.16.168:81/server-status (/server-status) 

结果是这样的

我用ab测试 并发1000,效果真的不如意啊

 

lighttpd mod_status模块