在 Ubuntu 17.10 上安装 AWFFull Web 服务器日志分析应用程序
AWFFull 日志
![](/data/attachment/album/201804/23/125729f4mx8b49m98b094b.png)


AWFFull 是基于 “Webalizer” 的 Web 服务器日志分析程序。AWFFull 以 HTML 格式生成使用统计信息以便用浏览器查看。结果以柱状和图形两种格式显示，这有利于解释数据。它提供每年、每月、每日和每小时的使用统计数据，并显示网站、URL、referrer、user agent（浏览器）、用户名、搜索字符串、进入/退出页面和国家（如果一些信息不存在于处理后日志中那么就没有）。AWFFull 支持 CLF（通用日志格式）日志文件，以及由 NCSA 等定义的组合日志格式，它还能只能地处理这些格式的变体。另外，AWFFull 还支持 wu-ftpd xferlog 格式的日志文件，它能够分析 ftp 服务器和 squid 代理日志。日志也可以通过 gzip 压缩。


如果检测到压缩日志文件，它将在读取时自动解压缩。压缩日志必须是 .gz 扩展名的标准 gzip 压缩。


### 对于 Webalizer 的修改


AWFFull 基于 Webalizer 的代码，并有许多或大或小的变化。包括：


* 不止原始统计数据：利用已发布的公式，提供额外的网站使用情况。
* GeoIP IP 地址能更准确地检测国家。
* 可缩放的图形
* 与 GNU gettext 集成，能够轻松翻译。目前支持 32 种语言。
* 在首页显示超过 12 个月的网站历史记录。
* 额外的页面计数跟踪和排序。
* 一些小的可视化调整，包括 Geolizer 用量中使用 Kb、Mb。
* 额外的用于 URL 计数、进入和退出页面、站点的饼图
* 图形上的水平线更有意义，更易于阅读。
* User Agent 和 Referral 跟踪现在通过 PAGES 而非 HITS 进行计算。
* 现在支持 GNU 风格的长命令行选项（例如 --help）。
* 可以通过排除“什么不是”以及原始的“什么是”来选择页面。
* 对被分析站点的请求以匹配的引用 URL 显示。
* 404 错误表，并且可以生成引用 URL。
* 生成的 html 可以使用外部 CSS 文件。
* POST 分析总结使得手动优化配置文件性能更简单。
* 可以将指定的 IP 和地址分配给指定的国家。
* 便于使用其他工具详细分析的转储选项。
* 支持检测并处理 Lotus Domin- v6 日志。


### 在 Ubuntu 17.10 上安装 AWFFull



```
sud- apt-get install awffull

```

### 配置 AWFFull


你必须在 `/etc/awffull/awffull.conf` 中编辑 AWFFull 配置文件。如果你在同一台计算机上运行多个虚拟站点，​​则可以制作多个默认配置文件的副本。



```
sud- vi /etc/awffull/awffull.conf

```

确保有下面这几行：



```
LogFile /var/log/apache2/access.log.1
OutputDir /var/www/html/awffull

```

保存并退出文件。


你可以使用以下命令运行 awffull。



```
awffull -c [your config file name]

```

这将在 `/var/www/html/awffull` 目录下创建所有必需的文件，以便你可以使用 http://serverip/awffull/ 。


你应该看到类似于下面的页面：


![](/data/attachment/album/201804/23/125730u7utna7bc7daaoum.png)


如果你有更多站点，你可以使用 shell 和计划任务自动化这个过程。




---


via: <http://www.ubuntugeek.com/install-awffull-web-server-log-analysis-application-on-ubuntu-17-10.html>


作者：[ruchi](http://www.ubuntugeek.com/author/ubuntufix) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
# Install AWFFull web server log analysis application on ubuntu 17.10

**Sponsored Link**

AWFFull supports CLF (common log format) log files, as well as Combined log formats as defined by NCSA and others, and variations of these which it attempts to handle intelligently. In addition, AWFFull also supports wu-ftpd xferlog formatted log files, allowing analysis of ftp servers, and squid proxy logs. Logs may also be compressed, via gzip.

If a compressed log file is detected, it will be automatically uncompressed while it is read. Compressed logs must have the standard gzip extension of .gz.

**Changes from Webalizer**

AWFFull is based on the Webalizer code and has a number of large and small changes. These include:

o Beyond the raw statistics: Making use of published formulae to provide additional insights into site usage.

o GeoIP IP Address look-ups for more accurate country detection.

o Resizable graphs.

o Integration with GNU gettext allowing for ease of translations.Currently 32 languages are supported.

o Display more than 12 months of the site history on the front page.

o Additional page count tracking and sort by same.

o Some minor visual tweaks, including Geolizer’s use of Kb, Mb etc for Volumes.

o Additional Pie Charts for URL counts, Entry and Exit Pages, and Sites.

o Horizontal lines on graphs that are more sensible and easier to read.

o User Agent and Referral tracking is now calculated via PAGES not HITS.

o GNU style long command line options are now supported (eg --help).

o Can choose what is a page by excluding "what isn’t" vs the original "what is" method.

o Requests to the site being analysed are displayed with the matching referring URL.

o A Table of 404 Errors, and the referring URL can be generated.

o An external CSS file can be used with the generated html.

o Manual performance optimisation of the config file is now easier with a post analysis summary output.

o Specified IP’s & Addresses can be assigned to a given country.

o Additional Dump options for detailed analysis with other tools.

o Lotus Domino v6 logs are now detected and processed.

**Install awffull on ubuntu 17.10**

sudo apt-get install awffull


**Configuring AWFFULL**

You have to edit awffull config file at /etc/awffull/awffull.conf. If you have multiple virtual websites running in the same machine, you can make several copies of the default config file.

sudo vi /etc/awffull/awffull.conf


Make sure the following lines are there

LogFile /var/log/apache2/access.log.1


OutputDir /var/www/html/awffull

Save and exit the file

You can run the awffull config using the following command

awffull -c [your config file name]


This will create all the required files under /var/www/html/awffull directory so you can access your webserver stats using http://serverip/awffull/

You should see similar to the following screen

If you have more site and you can automate the process using shell script and cron job.