1. Dmitry Alenichev
  2. ngx_stats

Overview

HTTPS SSH
Lua statistics logger for the ngx_lua based on the internal nginx
variables.

Sample usage

http {
    lua_shared_dict stats 1M;
    log_by_lua_file log.lua;

    server {
        listen       80;
        server_name  localhost;

        location = /stats {
            default_type 'text/plain';
            content_by_lua_file stats.lua;
        }
    }
}

Multiple zones

    map $server_name $zone {
        hostnames;
        example.com example;
        default default;
    }