AWStats analyzes Nginx access logs
AWStats is a fast-growing Perl-based WEB log analysis tool on Sourceforge.
It can collect the following information about your site:
- Visits (UV), visits, page views (PV), clicks, data traffic, etc.
- Accurate to monthly, daily, and hourly data
- Visitor country
- Visitor IP
- Robots/Spiders statistics
- Guest duration
- Statistics on different Files types
- Pages-URL statistics
- Visitor Operating System Browser and other information
- Other information (search keyword, etc)
AWStats configuration (Windows + Apache)
In CentOS 6.3, AWStats + GeoIP allows you to view the website Access Locations
Nginx log analysis AWStats + JAWStats installation Configuration
Classic log analysis tool-AWStats
AWStats log system configuration file and error Induction
Use AWStats to analyze website logs-powerful log analysis tools
The following describes how to analyze Nginx logs in AWStats:
1. Configure the nginx log format
Modify the log format of nginx. conf. Otherwise, awstats cannot be analyzed.
Log_format access' $ remote_addr-$ remote_user [$ time_local] "$ request "'
'$ Status $ body_bytes_sent "$ http_referer "'
'"$ Http_user_agent" "$ http_x_forwarded_for "';
Access_log/var/log/nginx/access. log access;
Note that the double quotation marks in the log format cannot be left blank and each parameter is separated by a space. As long as there are slight differences, awstats cannot read logs.
After modification, make nginx repeat the configuration file:
Shell # nginx-t & nginx-s reload
Ii. Automatic nginx log Cutting
Run a shell script to cut nginx logs at every night. The script content is as follows:
#! /Bin/bash
#
# Filename: nginxCutLog. sh
# Author: Qicheng
# Website: