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

Nginx Series (16) nginx log analysis goaccess

WBOY
Release: 2016-08-08 09:23:44
Original
1349 people have browsed it

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>
Copy after login
<code><span>.</span>/configure –enable<span>-geoip</span> –enable<span>-utf8</span>make <span>&&</span> make install </code>
Copy after login

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>
Copy after login

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>
Copy after login

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>
Copy after login

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.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template