There are several projects that are approaching it:
https://github.com/vozlt/nginx-module-vts
And on senginx.org you can try to compile nginx with this module (ngx_http_statistics) with the need to fix some basic nginx files
Another alternative, depending on what type of statistics you need, is to use lua, and there are several projects on github to give you a start. Here is one that I used as the basis for my stat.
https://github.com/yandex-sysmon/nginx-lua-stats
steven
source share