How to analysis Nginx log using visitors

Dwonload web log analysis tool visitors

visitors home page:

Download ane compIle visitors

tuenhai@ubuntu:~$ mkdir download
$ cd download
$ wget
$ tar -xzf visitors*
$ cd visitors-0.7
$ make
$ mkdir ~/bin
$ mv visitors ~/bin/
$ chmod 700 ~/bin/visitors


$ cd ~
~$ vi .profile
export PATH="$PATH:~/bin"
~$ source .profile

Creae a bash file to parse Nginx log file

~$ cd logs
logs$ vi parselog
visitors -A -m 30 tuenhai.com_access.log -o html --trails --prefix  > --prefix ~/public/

logs$ chmod 700 parselog


  • -A --all

    Activate all the optional reports. This option is equivalent to -GKUWRDOB. Note that --trails is not implicitly included in this option because it also requires --prefix. See the --trails option documentation for details.

  • -m --max-lines number

    Set the max number of entries that should be shown in reports like referers, keyphrases and so on. This option sets all the reports max number of entries for all the reports at once

  • -T --trails

    Enable the Web Trails feature. The report will show what are the more frequent moves between pages of your site. This option requires the --prefix option to work

  • -P --prefix number

    Prefixes specify to visitors how a link should look like to be classified as internal to your site. This option is required for --trails and will also have the nice effect to avoid that internal links are shown in the referers report. If you are analyzing statistics for, just use:


    If your site is reachable using more hostnames you should specify all these, like in the following example:

    --prefix --prefix

View HTML log report /


任何人生疑惑,请找 海云青飞