



















这是一个创建于 3810 天前的主题,其中的信息可能已经有所发展或是发生改变。
# nginx.conf http { ... ... lua_shared_dict statics_dict 1M; # 初始化变量 lua_package_path "/etc/nginx/ngx_lua_reqstatus/?.lua"; #路径 log_by_lua_file "/etc/nginx/ngx_lua_reqstatus/hook.lua"; # 添加此句 server { listen 80; server_name www.justforfun.com; location /{ ... } } # http 接口 server { listen 127.0.0.1:6080; location /{ access_by_lua_file "/etc/nginx/ngx_lua_reqstatus/status.lua"; } } }
查看 www.justforfun.com 的运行状况:
curl localhost:6080/?domain=www.justforfun.com
输出
Server Name key: www.justforfun.com Seconds SinceLast: 26.601999998093 Average Req Time Sec: 0.031799983978271 Request Count: 5 Requests Per Secs: 0.18795579281101 5xx num: 0
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。