【问题标题】:How to use awstats with OpenLiteSpeed WebAdmin?如何将 awstats 与 OpenLiteSpeed WebAdmin 一起使用?
【发布时间】:2020-12-22 06:12:26
【问题描述】:

是否可以在 OpenLiteSpeed 中安装 AWstats 日志分析器?

我在 2015 年的文档中找不到 lsws/admin/misc/awstats_install.sh 脚本: https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:config:awstats

所以我在我的 Ubuntu droplet 上使用 sudo apt install awstats 手动安装了 AWstats,但我缺少有关如何在 OpenLiteSpeed WebAdmin 中引入图表的链接。

谢谢

【问题讨论】:

    标签: ubuntu awstats openlitespeed


    【解决方案1】:

    我刚刚做了一个粗略的设置,手动设置 AwStats 似乎可以在我的 OpenLiteSpeed 网络服务器上运行。

    1. 安装您已经安装的 AwStats sudo apt install awstats
    2. 设置 AwStats 配置。请将以下条目添加到 /etc/awstats/awstats.conf
    • 包括“/etc/awstats/awstats.conf.local”
    • Lo​​gFile="/var/www/html/logs/access.log"
    • SiteDomain="example.com"
    • HostAliases="example.com localhost 127.0.0.1"
    • AllowToUpdateStatsFromBrowser=1

    注意,请务必将 example.com 域名和访问日志路径替换为您自己的设置。

    1. 验证您的 AwStats 设置

    构建从当前日志生成的初始统计信息,

    /usr/lib/cgi-bin/awstats.pl -config=example.com -update
    

    示例返回:

    From data in log file "/var/www/html/logs/access.log"...
    Phase 1 : First bypass old records, searching new record...
    Direct access after last parsed record (after line 50)
    Jumped lines in file: 50
    Found 50 already parsed records.
    Parsed lines in file: 146
    Found 0 dropped records,
    Found 0 comments,
    Found 0 blank records,
    Found 0 corrupted records,
    Found 0 old records,
    Found 146 new qualified records.
    

    如果输出没有错误,我们可以开始设置 Awstats 显示

    1. 显示 Awstats

    将 cgi-bin 和图标的符号链接添加到文档根目录

    ln -sf /usr/lib/cgi-bin /var/www/html/cgi-bin
    
    ln -sf /usr/share/awstats/icon/* /var/www/html/awstats-icon
    

    导航到 Web Admin at port 7080 > VirtualHosts > Name > Context,然后创建 CGI 上下文

    • URI=/cgi-bin/
    • 路径=/var/www/html/cgi-bin

    点击保存按钮,优雅地重启网络服务器。

    现在您可以通过访问 URL http://your-server-ip/cgi-bin/awstats.pl?config=example.com 来访问您的 AwStats

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-07-14
      • 2021-01-02
      • 1970-01-01
      • 2023-03-13
      • 2014-09-25
      • 2016-01-30
      • 2015-12-13
      相关资源
      最近更新 更多