Skip to content

Commit 2cb96ec

Browse files
committed
Community Edition First Release: 73 languages, 13 calendars, dark theme, responsive design, embedded documentation
1 parent 67c4423 commit 2cb96ec

1,126 files changed

Lines changed: 500748 additions & 38997 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 590 additions & 191 deletions
Large diffs are not rendered by default.

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: AWStats UTF-8 重构版完整测试
1+
name: AWStats UTF-8 社区版完整测试
22

33
on:
44
push:
@@ -301,7 +301,7 @@ jobs:
301301
# 创建汇总报告
302302
REPORT="test/reports/FULL_TEST_REPORT_${{ matrix.perl-version }}.md"
303303
304-
echo "# AWStats UTF-8重构版完整测试报告" > $REPORT
304+
echo "# AWStats UTF-8社区版完整测试报告" > $REPORT
305305
echo "" >> $REPORT
306306
echo "## 测试信息" >> $REPORT
307307
echo "" >> $REPORT

README-zh_CN.md

Lines changed: 361 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,361 @@
1+
# AWStats 8.1 - 高级网站统计工具(社区版)
2+
3+
<p align="center">
4+
<img src="docs/images/screenshot.png" alt="AWStats Dashboard Preview" width="800">
5+
</p>
6+
7+
<p align="center">
8+
<a href="https://www.gnu.org/licenses/gpl-3.0.html#license-text"><img src="https://img.shields.io/badge/许可证-GPL%20v3-blue.svg" alt="许可证"></a>
9+
<a href="https://www.perl.org/"><img src="https://img.shields.io/badge/Perl-5.20%2B-brightgreen.svg" alt="Perl 版本"></a>
10+
<br><br>
11+
<a href="https://github.com/hestiacn/vstats/releases/latest"><img src="https://img.shields.io/github/v/release/hestiacn/vstats?style=for-the-badge&logo=github&label=最新版本&color=blue" alt="最新版本"></a>
12+
<br><br>
13+
<a href="docs/CHANGELOG-zh_CN.md"><img src="https://img.shields.io/badge/📝_更新日志-中文版-0891b2?style=for-the-badge&logo=markdown&logoColor=white" alt="更新日志"></a>
14+
<br><br>
15+
<a href="docs/CHANGELOG.md"><img src="https://img.shields.io/badge/📝_Changelog-English_Version-0891b2?style=for-the-badge&logo=markdown&logoColor=white" alt="Changelog"></a>
16+
</p>
17+
18+
> **🎉 这是 vstats 的首个主要社区版本!** 是对传奇的 `AWStats` (1997-2025) 的全面重构。我们为其拂去尘埃,使其焕然一新,足以应对未来 25 年的挑战!
19+
20+
原始 `AWStats` 在经历了 25 年的维护后,于 2025 年 11 月归档。本项目在原始基础上进行了全面重构和功能增强,由 [hestiacn](https://github.com/hestiacn/vstats) 社区持续维护。
21+
22+
---
23+
24+
## 🚀 发布亮点
25+
26+
### 1. 原生 UTF-8 支持(告别繁琐编码)
27+
28+
告别令人头疼的编码问题!所有内部逻辑和输出现在都完全采用 UTF-8 编码。中文、日文、阿拉伯文和其他特殊字符现在都能完美呈现。
29+
30+
### 2. 全球“灵魂”本地化(73 种语言)
31+
32+
- 将整个翻译系统从数字索引切换到语义键(`_t('key')`
33+
- 新增/更新了 73 种语言(包括塞浦路斯语、巴西葡萄牙语、等)
34+
- 为 24 小时统计数据配上了独特幽默的“吐槽”描述——给凌晨 4 点还在工作的系统管理员们一个小小的惊喜!☕️
35+
36+
### 3. 现代化的用户界面和响应式设计
37+
38+
- **深色/浅色模式**:一键切换明暗主题
39+
- **纯 CSS 图表**:旧的 PNG 图像已被支持 `border-radius` 的现代 CSS 图表取代
40+
- **表情符号集成**:使用 Emoji 进行数据可视化,打造现代化的视觉体验
41+
42+
### 4. 性能与代码优化
43+
44+
- 对 Perl 代码进行了重大清理,以提升在现代 CGI 环境下的性能
45+
- 改进了对现代浏览器和机器人的检测(2026 年最新规则)
46+
47+
### 5. 多历法支持和13月 🗓️
48+
49+
支持日本年号、佛历、民国纪年、甲子纪年、伊斯兰历、波斯历等 **13 种历法**(含埃塞俄比亚 **13 个月**历法),自动匹配站点语言。
50+
51+
> 📌 **埃塞俄比亚历**:前 12 个月各 30 天,第 13 个月闰年 6 天平年 5 天。
52+
> 📌 **希伯来历**:19 年 7 闰,闰年增加一个月(Adar I,30 天),共 13 个月。
53+
54+
### 6. 自定义品牌展示 🏷️
55+
56+
> **适用于主机商和企业用户**
57+
58+
现在支持在 `AWStats` 页面顶部显示自定义品牌信息,包括 **Logo****品牌名称**
59+
60+
**功能特性**
61+
- 📍 品牌区域仅在 `/stats/logo.svg` 文件存在时自动显示
62+
- 🔗 支持自定义品牌链接(Logo 点击跳转)
63+
- 🏷️ 支持任意品牌名称(建议使用英文名称,兼容多语言环境),自动拼接为 **`品牌名 + " 服务器管理面板"`**
64+
65+
**适用场景示例**
66+
| 类型 | 示例 |
67+
|:---:|:---:|
68+
| 🐧 Linux 发行版 | `RHEL``Debian``Ubuntu``CentOS``Arch Linux``Fedora``Rocky Linux` |
69+
| 🖥️ 操作系统 | `macOS``Windows``FreeBSD` |
70+
| ☁️ 云主机商 | `Aliyun``Tencent``AWS``Azure``Google Cloud` |
71+
72+
**配置示例**
73+
```perl
74+
# 在 AWStats 配置文件中添加
75+
BrandLink="https://example.com" # Logo 点击跳转链接
76+
BrandPlatform="Ubuntu" # 品牌名称(显示 "Ubuntu 服务器管理面板")
77+
StatsUrl="/vstats" # AWStats 部署目录
78+
```
79+
80+
> **注意**:品牌区域仅在 `logo.svg` 文件存在时显示,未配置 `BrandLink` 时将使用默认值 `https://hestiacp.com`
81+
82+
---
83+
84+
## 📦 下载与安装
85+
86+
请从下方链接获取最新版本:
87+
88+
| 系统/格式 | 下载链接 |
89+
|:---:|:---:|
90+
| **Debian/Ubuntu** | [![下载 .deb 包](https://img.shields.io/badge/下载-.deb_包-2ea44f?logo=debian&logoColor=white)](https://github.com/hestiacn/vstats/releases/latest/download/awstats_8.1-1_all.deb) |
91+
| **RHEL/CentOS/Fedora** | [![下载 .rpm 包](https://img.shields.io/badge/下载-.rpm_包-2ea44f?logo=fedora&logoColor=white)](https://github.com/hestiacn/vstats/releases/latest/download/awstats-8.1-1.noarch.rpm) |
92+
| **源码包 (tar.gz)** | [![下载源码 .tar.gz](https://img.shields.io/badge/下载-.tar.gz-2ea44f?logo=sourceforge&logoColor=white)](https://github.com/hestiacn/vstats/releases/latest/download/awstats-8.1.tar.gz) |
93+
| **源码包 (zip)** | [![下载源码 .zip](https://img.shields.io/badge/下载-.zip-2ea44f?logo=sourceforge&logoColor=white)](https://github.com/hestiacn/vstats/releases/latest/download/awstats-8.1.zip) |
94+
| **Windows** | [![下载 Windows版](https://img.shields.io/badge/下载-Windows版-2ea44f?logo=windows&logoColor=white)](https://github.com/hestiacn/vstats/releases/latest/download/awstats-8.1.exe) |
95+
96+
> **Windows 环境说明**:Windows 版本仅打包了 EXE 安装包,目录结构和路径均未经过实际测试。如在使用中遇到问题,欢迎提交 Issue 或 Pull Request 协助修复!
97+
98+
---
99+
100+
## 📊 与原版对比
101+
102+
| 特性 | 原始 AWStats | 重构版本 |
103+
|:---:|:---:|:---:|
104+
| 编码 | GBK / 局部编码 | **UTF-8 全支持** |
105+
| 翻译方式 | 数字索引 `$Message[169]` | **语义化键名 `_t('key')`** |
106+
| 界面风格 | 固定样式 | **明暗主题切换 + 响应式** |
107+
| 国家 | PNG图像 | **Emoji** |
108+
| 图表 | PNG 图像 | **纯 CSS 图表** |
109+
| 历法支持 | 公历 | **12 种历法** |
110+
| 维护状态 | 已归档 | **持续维护** |
111+
112+
---
113+
114+
## ✨ 完整功能列表
115+
116+
| 类别 | 功能 |
117+
|:---:|:---:|
118+
| 🌐 多语言cgi访问 | `73` 种语言界面,浏览器自动识别。让全球访客用母语查看报告![查看详细语言支持列表](docs/CHANGELOG-zh_CN.md#--语言支持) |
119+
| 🗓️ 多历法支持 | 日本年号、佛历、民国纪年、甲子纪年、伊斯兰历、波斯历等 **13 种历法**(含埃塞俄比亚 13 月历),自动匹配站点语言 |
120+
| 📊 访问统计 | 独立访客、访问次数、访问时长、认证用户追踪 |
121+
| 🌍 地理位置 | `DB-IP` 免费数据库,国家/地区/城市三级定位,IPv4/IPv6 支持 |
122+
| 💻 客户端信息 | 浏览器、操作系统、屏幕分辨率、设备类型(桌面/移动) |
123+
| 🤖 爬虫识别 | `500+` 搜索引擎爬虫,AI/ML 爬虫(ClaudeBot、GPTBot 等) |
124+
| 📁 文件统计 | 文件类型、下载(断点续传)、压缩(mod_gzip/mod_deflate) |
125+
| ⚠️ 错误分析 | `HTTP` 错误(404 等)、错误来源、蠕虫攻击检测状态码本地化描述 |
126+
| 🎨 现代化界面 | 响应式设计、深色/浅色主题、纯 CSS 图表、Emoji 国旗图标 |
127+
128+
---
129+
130+
## 📋 系统要求
131+
132+
### 基本要求
133+
- ✅ 能够访问要分析的服务器日志文件(Web/FTP/邮件)
134+
- ✅ 5.20 或更高版本(推荐 5.32+)
135+
- ✅ 命令行和/或 CGI 环境
136+
137+
### 支持的操作系统
138+
- 🐧 Linux/Unix(Ubuntu、Debian、CentOS、RHEL 等)
139+
- 🪟 Windows(Windows 10/11、Windows Server)
140+
- 🍎 macOS
141+
- 🔵 FreeBSD、OpenBSD
142+
143+
### 支持的服务器
144+
- 🌐 Web:Apache、Nginx、IIS、Caddy、Lighttpd
145+
- 📁 FTP:ProFTPd、vsFTPd、Pure-FTPd
146+
- 📧 邮件:Postfix、Sendmail、QMail、Exim
147+
- 🎥 流媒体:RealMedia、Windows Media Server
148+
149+
---
150+
151+
## 🔄 升级前转换(仅限从旧版升级)
152+
153+
若涉及站点升级,请先执行 `/usr/share/awstats/tools/awstats_convert-zh.pl` 对历史数据文件(*.txt)进行格式转换(7.0-7.9 → 8.1)。程序将自动检测 `/home/*/web/*/stats/` 目录下的所有 `AWStats` 数据文件(*.txt)并进行批量转换。请放心执行,它将在转换前自动备份原文件。若您的站点不在 `home` 目录下,请参考这个路径结构 `/home/站点运行用户名/web/您的域名/stats/` 微调。转换完成后,再执行数据更新操作,否则将因格式不兼容导致更新失败。
154+
155+
> **注意**:若您的站点版本低于 7.0,请根据实际版本号调整脚本中 `s/AWSTATS DATA FILE 7\.[0-9]{1,2}/AWSTATS DATA FILE 8.1/` 正则表达式的匹配参数。
156+
>
157+
> **💡 提示**:备份文件默认保存在 `/backup/awstats_converter/backup_执行时的时间戳命名/` 目录下。
158+
159+
```bash
160+
# 试运行(查看将要转换哪些文件)
161+
perl /usr/share/awstats/tools/awstats_convert-zh.pl --dryrun
162+
163+
# 正式运行
164+
perl /usr/share/awstats/tools/awstats_convert-zh.pl
165+
166+
# 强制重新转换所有文件
167+
perl /usr/share/awstats/tools/awstats_convert-zh.pl --force
168+
169+
# 安静模式
170+
perl /usr/share/awstats/tools/awstats_convert-zh.pl --quiet
171+
172+
# 查看帮助
173+
perl /usr/share/awstats/tools/awstats_convert-zh.pl --help
174+
```
175+
---
176+
177+
## 🚀 快速开始
178+
179+
### 1. 安装
180+
181+
#### HestiaCP 用户(推荐)
182+
183+
HestiaCP 已自带 AWStats,只需更新安装 deb 包。
184+
185+
支持官方 [Debian](https://github.com/hestiacp/hestiacp) 和爱好者 [RHEL](https://github.com/bayrepo/hestiacp-rpm)
186+
187+
**您需要调整的文件**
188+
- 模板文件:`/usr/local/hestia/data/templates/web/awstats/awstats.tpl`
189+
- 域名配置:`/etc/awstats/` 目录下
190+
- 更新脚本:`/usr/local/hestia/bin/v-update-web-domain-stat`
191+
- 参考脚本模板:[v-update-web-domain-stat](/make/test/awstats/conf/v-update-web-domain-stat)
192+
- 参考配置模板:[awstats.tpl](/make/test/awstats/conf/awstats.tpl)
193+
194+
#### 下载并安装
195+
196+
```bash
197+
# 使用 HestiaCP 安装时提示配置文件是否更新,请选择 N(保留原配置)
198+
wget -P /tmp/ https://github.com/hestiacn/vstats/releases/latest/download/awstats_8.1-1_all.deb && apt install -y /tmp/awstats_8.1-1_all.deb
199+
```
200+
201+
### Debian/Ubuntu
202+
203+
```bash
204+
wget -P /tmp/ https://github.com/hestiacn/vstats/releases/latest/download/awstats_8.1-1_all.deb && apt install -y /tmp/awstats_8.1-1_all.deb
205+
```
206+
207+
### RHEL/CentOS/Fedora
208+
209+
```bash
210+
wget https://github.com/hestiacn/vstats/releases/latest/download/awstats-8.1-1.noarch.rpm
211+
dnf localinstall -y awstats-8.1-1.noarch.rpm
212+
```
213+
214+
### 基本配置
215+
216+
编辑配置文件 `/etc/awstats/awstats.yourdomain.conf`
217+
218+
```perl
219+
LogFile="/var/log/apache2/domains/yourdomain.log" # 日志文件路径
220+
LogFormat=1 # 使用 combined 日志格式
221+
SiteDomain="yourdomain.com" # 网站域名
222+
HostAliases="localhost 127.0.0.1" # 主机别名
223+
```
224+
225+
### 更新统计
226+
227+
```bash
228+
awstats.pl -config=yourdomain -update
229+
```
230+
231+
### 查看报告
232+
233+
- **HestiaCP 环境**:访问 `https://yourdomain.com/vstats/`如果您需要保存书签请设置这个目录。访问后自动加载为cgi模式!
234+
- **手动生成静态报告**`awstats.pl -config=yourdomain -output > report.html`
235+
236+
---
237+
238+
## 📖 命令行帮助
239+
240+
### 使用您的母语查看帮助
241+
242+
```bash
243+
# 繁體中文
244+
dnf install -y glibc-langpack-zh
245+
localectl set-locale LANG=zh_TW.UTF-8
246+
# RHEL 請使用以下命令
247+
source /etc/locale.conf
248+
# Debian 請使用以下命令
249+
source /etc/default/locale
250+
awstats -h
251+
252+
# English (US)
253+
dnf install -y glibc-langpack-en
254+
localectl set-locale LANG=en_US.UTF-8
255+
# For RHEL/CentOS/Fedora:
256+
source /etc/locale.conf
257+
# For Debian/Ubuntu:
258+
source /etc/default/locale
259+
awstats -h
260+
261+
# 日本語
262+
dnf install -y glibc-langpack-ja
263+
localectl set-locale LANG=ja_JP.UTF-8
264+
# RHEL では以下のコマンドを使用
265+
source /etc/locale.conf
266+
# Debian では以下のコマンドを使用
267+
source /etc/default/locale
268+
awstats -h
269+
270+
# 简体中文
271+
dnf install -y glibc-langpack-zh wget
272+
localectl set-locale LANG=zh_CN.UTF-8
273+
# RHEL 使用以下命令
274+
source /etc/locale.conf
275+
# Debian 请使用以下命令
276+
source /etc/default/locale
277+
awstats -h
278+
279+
# English (UK)
280+
dnf install -y glibc-langpack-en
281+
localectl set-locale LANG=en_GB.UTF-8
282+
# For RHEL/CentOS/Fedora:
283+
source /etc/locale.conf
284+
# For Debian/Ubuntu:
285+
source /etc/default/locale
286+
awstats -h
287+
288+
# Português (Brasil)
289+
dnf install -y glibc-langpack-pt
290+
localectl set-locale LANG=pt_BR.UTF-8
291+
# Para RHEL/CentOS/Fedora:
292+
source /etc/locale.conf
293+
# Para Debian/Ubuntu:
294+
source /etc/default/locale
295+
awstats -h
296+
```
297+
298+
### 常用命令
299+
300+
| 命令 | 说明 |
301+
|:---:|:---:|
302+
| `awstats.pl -config=xxx -update` | 更新统计 |
303+
| `awstats.pl -config=xxx -output > report.html` | 生成静态报告 |
304+
| `awstats.pl -config=xxx -update -debug=2` | 调试模式需要在配置文件更改此参数默认为0(关闭) DebugMessages=1 |
305+
| `awstats -h` | 显示帮助 |
306+
| `awstats -v` | 显示版本信息 |
307+
308+
---
309+
310+
## 📚 文档
311+
312+
| 文档 | 链接 |
313+
|:---:|:---:|
314+
| 中文更新日志 | [docs/CHANGELOG-zh_CN.md](docs/CHANGELOG-zh_CN.md) |
315+
| 英文更新日志 | [docs/CHANGELOG.md](docs/CHANGELOG.md) |
316+
| 安装指南 | [docs/awstats_setup.html](docs/awstats_setup.html) |
317+
| 配置说明 | [docs/awstats_config.html](docs/awstats_config.html) |
318+
| 常见问题 | [docs/awstats_faq.html](docs/awstats_faq.html) |
319+
320+
---
321+
322+
## 🤝 贡献与反馈
323+
324+
- **项目仓库**[GitHub - hestiacn/vstats](https://github.com/hestiacn/vstats)
325+
- **问题反馈**[GitHub Issues](https://github.com/hestiacn/vstats/issues)
326+
327+
---
328+
329+
## 💖 致谢
330+
331+
特别感谢所有帮助我们正确翻译威尔士语和阿拉伯语六种复数形式的翻译人员和测试人员。你们是真正的网络英雄!
332+
333+
---
334+
335+
## 📄 许可证
336+
337+
`AWStats` 是开源软件,基于 [GNU General Public License v3](https://www.gnu.org/licenses/gpl-3.0.html#license-text) 发布。
338+
339+
---
340+
341+
## 👨‍💻 关于作者与维护
342+
343+
**原始作者**:Laurent Destailleur(1997-2025)
344+
- 项目创始人,于 2025 年 11 月宣布停止更新。
345+
- [Dolibarr ERP CRM](https://www.dolibarr.org) 项目负责人
346+
347+
**社区维护**[hestiacn](https://github.com/hestiacn/vstats)
348+
- 8.1 版本现代化重构
349+
- 持续维护与更新
350+
351+
---
352+
353+
## 🔗 相关链接
354+
355+
- 原始项目网站:[https://www.awstats.org](https://www.awstats.org)
356+
- 原始项目 GitHub 仓库:[eldy/AWStats](https://github.com/eldy/AWStats)
357+
- DB-IP 数据库:[https://db-ip.com](https://db-ip.com)
358+
359+
---
360+
361+
## © 1997-2026 AWStats 团队 | 社区版持续维护中

0 commit comments

Comments
 (0)