varnish: how to split log files based on vhosts -


i'm using varnish 4. want see web traffic awstats, samples found on internet varnishncsa -m "rxheader:^host: domain.com$" -a -w blabla. problem latest version of varnishncsa doesn't know "m" option

$ varnishncsa -v varnishncsa (varnish-4.0.3 revision b8c4a34) copyright (c) 2006 verdens gang copyright (c) 2006-2014 varnish software $ varnishncsa -m "rxheader:^host: domain.com$" -a -w /web/htdocs/olivier/stats/awstats-7.4/test.tmp varnishncsa: invalid option -- 'm' 

thus how should split log files based on vhosts?

it's "-q" option.

here's working sample:

varnishncsa -a -d \     -q 'reqheader:host ~ "mywebsite"' \     -w /web/logs/mywebsite/access.varnish.log \     -p /var/run/varnishncsa.mywebsite.pid 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -