Home  >  Article  >  Backend Development  >  Nginx Series (16) nginx log analysis goaccess

Nginx Series (16) nginx log analysis goaccess

WBOY
WBOYOriginal
2016-08-08 09:23:441286browse

1. Download

Download address: http://goaccess.io/

2. Install

<code>yum <span>-y</span> install glib2 glib2<span>-devel</span> ncurses ncurses<span>-devel</span> GeoIP<span>*</span></code>
<code><span>.</span>/configure –enable<span>-geoip</span> –enable<span>-utf8</span>make <span>&&</span> make install </code>

3. Use

1. Directly view the command line

<code>goaccess <span>-f</span> access<span>.</span><span>log</span><span>-c</span><span>-a</span></code>

2. Output to html

Configuration~ /.goaccessrc file

<code>color_scheme <span>0</span>
date_format <span>%d</span>/<span>%b</span>/<span>%Y</span>
log_format <span>%h</span><span>%^</span>[<span>%d</span>:<span>%^</span>] “<span>%r</span>” <span>%s</span><span>%b</span> “<span>%R</span>” “<span>%u</span>” <span>%T</span></code>

Generate command

<code>goaccess <span>-f</span> /web/nginx/logs/access<span>.</span><span>log</span><span>-a</span><span>></span> report<span>.</span>html</code>

Reference:
http://my.oschina.net/mrco/blog/181737

The above introduces the Nginx series (16) nginx log analysis goaccess, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn