question about traffic statistics on each vhost,is it possible?
manlio_perillo at libero.it
Mon Oct 22 13:52:23 MSD 2007
sinnis r ha scritto:
> hi,i wanna write a module to perform traffic statistic on every
> vhost,but after i read the document:"Guide to Nginx Module Development
> <http://www.riceonfire.org/emiller/nginx-modules-guide.html>" and some
> code in /nginx-0.6.13/src/http/modules/,i found that i still have no idea...
> is it possible to write a new module to do this work?or this feature is
> not supported by current nginx?
Not sure, but you should be able to do this by writing an header filter
(for a possible setup for an Host) and a body filter to count data written.
See the ngx_http_chunked_filter module.
A possible "complication" is the fact that Nginx uses multiple worker
Regards Manlio Perillo
More information about the nginx