awstats安装配置

1. 下载awstats
http://www.awstats.org/

2.解压缩到 D:\awstats-7.4

3、初始化配置环境
进入 D:\awstats-7.4\tools
   执行 awstats_configure.pl文件
D:\awstats-7.4\tools>perl awstats_configure.pl

4、输入 Apache Web目录
Apache Web server path ('none' to skip):
>D:\Apache22

5、输入 httpd.conf的目录

Now, enter full config file path of your Web server.
Example: /etc/httpd/httpd.conf
Example: /usr/local/apache2/conf/httpd.conf
Example: c:\Program files\apache group\apache\conf\httpd.conf
Config file path ('none' to skip web server setup):

>D:\Apache22\conf\httpd.conf

6、然后无需建立新conf,选N 按回车两次

-----> Check and complete web server config file 'D:\Apache22\conf\httpd.conf'
  Add 'Alias /awstatsclasses "../wwwroot/classes/"'
  Add 'Alias /awstatscss "../wwwroot/css/"'
  Add 'Alias /awstatsicons "../wwwroot/icon/"'
  Add 'ScriptAlias /awstats/ "../wwwroot/cgi-bin/"'
  Add '<Directory>' directive
  AWStats directives added to Apache config file.

-----> Update model config file '..\wwwroot\cgi-bin\awstats.model.conf'
  File awstats.model.conf updated.

-----> Need to create a new config file ?
Do you want me to build a new AWStats config/profile
file (required if first install) [y/N] ?n

7、在 httpd.conf自动增加了以下内容:

#
# Directives to allow use of AWStats as a CGI
#
Alias /awstatsclasses "../wwwroot/classes/"
Alias /awstatscss "../wwwroot/css/"
Alias /awstatsicons "../wwwroot/icon/"
ScriptAlias /awstats/ "../wwwroot/cgi-bin/"

#
# This is to permit URL access to scripts/files in AWStats directory.
#
<Directory "../wwwroot">
    Options None
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

8、修改D:\awstats-7.4\wwwroot\cgi-bin中的awstats.pl
将#!/usr/bin/perl
改为
#!D:/Perl/bin/perl.exe

9、D:\awstats-7.4\wwwroot\cgi-bin中复制awstats.model.conf更改为awstats.www.dzh.com.conf

LogType=W
Lang="auto"更新为 Lang="cn"
SiteDomain="www.dzh.com"
AllowToUpdateStatsFromBrowser=0更为AllowToUpdateStatsFromBrowser=1

10、更改apache的httpd.conf配置文件
D:\Apache22\conf\httpd.conf
将 CustomLog "logs/access.log" common
更改为
CustomLog "|bin/rotatelogs.exe D:/Apache22/logs/access-%y%m%d.log 86400 480" combined

D:\Apache22\conf\extra\httpd-vhosts.conf
将 CustomLog "logs/access.log" common
更改为
CustomLog "|bin/rotatelogs.exe D:/Apache22/logs/access-%y%m%d.log 86400 480" combined

11、配置完成,重启apache

输入http://127.0.0.1:80/awstats/awstats.pl?config=www.dzh.com
提示
Forbidden

You don't have permission to access /awstats/awstats.pl on this server.
12 、更改httpd.conf
<Directory "../wwwroot">
   
Options None
   
AllowOverride None
 
Order allow,deny
 
Allow from all

</Directory>

更改为
<Directory "/awstats-7.4/wwwroot">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

Alias /awstatsclasses "../wwwroot/classes/"
Alias /awstatscss "../wwwroot/css/"
Alias /awstatsicons "../wwwroot/icon/"
ScriptAlias /awstats/ "../wwwroot/cgi-bin/"
更改为

Alias /awstatsclasses "/awstats-7.4/wwwroot/classes/"
Alias /awstatscss "/awstats-7.4/wwwroot/css/"
Alias /awstatsicons "/awstats-7.4/wwwroot/icon/"
ScriptAlias /awstats/ "/awstats-7.4/wwwroot/cgi-bin/"

13、重启apache, OK
http://127.0.0.1/awstats/awstats.pl?config=www.dzh.com
显示
 
统计网站:
www.dzh.com

摘要
按参观时间:
按月历史统计
按日期统计
按星期
每小时浏览次数
按参观者:
国家或地区

14、http://127.0.0.100/awstats/awstats.pl?config=www.dzh.com 也ok

15、安全设置httpd.conf中输入更改
<Directory "/awstats-7.4/wwwroot">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
  
    AuthType Basic
    AuthName "duanzhihua"
    AuthUserFile C:/AWStats/wwwroot/cgi-bin/.passwd
    Require valid-user require

</Directory>

16、进入apache,D:\Apache22\bin
执行htpasswd.exe生成用户名密码

htpasswd.exe -c D:/awstats-7.4/wwwroot/cgi-bin/.passwd duanzhihua

输入密码

D:\awstats-7.4\tools>cd D:\Apache22\bin

D:\Apache22\bin>htpasswd.exe -c D:/awstats-7.4/wwwroot/cgi-bin/.passwd duanzhihu
a
New password: ******
Re-type new password: ******

17、在D:\awstats-7.4\wwwroot\cgi-bin多了一个密码文件 .passwd

18、重启apache

再次打开
http://127.0.0.1/awstats/awstats.pl?config=www.dzh.com

输入用户名密码报错
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, admin@example.com and inform them of the time the error occurred, and

anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

检查日志
127.0.0.1 - duanzhihua [20/Sep/2015:21:51:19 +0800] "GET /awstats/awstats.pl?config=www.dzh.com HTTP/1.1" 500

537 "-" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130

Safari/537.36"

[Sun Sep 20 21:51:19 2015] [error] [client 127.0.0.1] (OS 3)系统找不到指定的路径。  : Could not open password

file: C:/AWStats/wwwroot/cgi-bin/.passwd

19.之前httpd。conf中的路径配错了
将AuthUserFile C:/AWStats/wwwroot/cgi-bin/.passwd
更改为AuthUserFile D:/AWStats/wwwroot/cgi-bin/.passwd

20 重启
打开http://127.0.0.1/awstats/awstats.pl?config=www.dzh.com

报错
[Sun Sep 20 21:58:28 2015] [error] [client 127.0.0.1] (OS 3)系统找不到指定的路径。  : Could not open password

file: D:/AWStats/wwwroot/cgi-bin/.passwd

21将
D:/AWStats/wwwroot/cgi-bin/.passwd
改为
D:\awstats-7.4\wwwroot\cgi-bin\.passwd

21重启测试

打开http://127.0.0.1/awstats/awstats.pl?config=www.dzh.com

输入用户名密码

一切OK

Apache Awstats 安装配置系列 (4)之 Awstats 安装 配置相关推荐

  1. beeline安装_Hive 系列 之 简介与安装

    下面是系列文章的目录 (1)hive系列之简介,安装,beeline和hiveserver2 (2)hive系列之基本操作 (3)hive系列之udf (4)hive系列之二级分区和动态分区 (5)h ...

  2. Apache的配置与应用【Apache访问控制】以及apache日志管理【日志分割、awstats日志分析】

    Apache的配置与应用以及日志管理 文章目录 Apache的配置与应用以及日志管理 一.Apache连接和访问控制 1.Apache连接 [1]KeepAlive [2]KeepAlive Time ...

  3. CI系列之五:SVNAdmin安装及配置

    一.准备工作 1.更新yum源 # yum -y update 2.sftp上传如下文件: jdk-7u65-linux-i586.tar.gz mysql57-community-release-e ...

  4. Git学习系列之Windows上安装Git之后的一些配置(图文详解)

    不多说,直接上干货! 前面博客 Git学习系列之Windows上安装Git详细步骤(图文详解) 第一次使用Git时,需要对Git进行一些配置,以方便使用Git. 不过,这种配置工作只需要进行一次便可, ...

  5. Flutter 系列(一)安装与配置

    您好,欢迎关注我的专栏,本篇是关于Flutter的系列篇,从简单的Flutter介绍开始,一步步带你了解进入Flutter的世界.你最好有一定的移动开发经验,如果没有也不要担心,在我的专栏底部给我留言 ...

  6. hadoop安装hive及配置mysql_Hadoop系列之Hive(数据仓库)安装配置

    Hadoop系列之Hive(数据仓库)安装配置 1.在NameNode安装 cd /root/soft tar zxvf apache-hive-0.13.1-bin.tar.gz mv apache ...

  7. Laravel系列教程一:安装及环境配置

    免费视频教程地址https://laravist.com/series/laravel-5-basic 最近在SF上面看到越来越多的Laravel相关的问题,而作为一个Laravel的脑残粉,本来打算 ...

  8. Apache 2.4.7在CentOS6.4中安装配置反向代理解决单外网IP对应多个内网主机的方法实践

    欢迎转载,转载时请保留全文及出处. Apache 2.4.7在CentOS6.4中安装配置反向代理解决单外网IP对应多个内网主机的方法实践 Apache安装 下载源程序(http://httpd.ap ...

  9. 64位php 套装 apache,WIN764位下 PHP7.3 apache2.4 安装配置

    一直使用 PHP5.6 突然没事干的时候想尝尝鲜,就下下了个最新版的 PHP7.3 ,据说 PHP7 比 PHP5快很多. 首先下载相关文件 PHP7.3 Apache2.4, https://win ...

最新文章

  1. px,em,rem,vh,vw,vmin,vmax的区别
  2. 动软分享社区系统实现个性化导购营销平台
  3. 服务器虚拟化软件XenServer 常见问题(一)
  4. window7 ubuntu12.04 Opensuse13.04 三系统安装
  5. OS / linux 内核 read 操作源代码分析
  6. ubuntu13.10无法登陆
  7. vue是否可以做行车轨迹_在vue中高德地图引入和轨迹的绘制的实现
  8. 基础知识—数据类型-第一个C++程序
  9. 工欲善其事,必先利其器——持续更新中……
  10. sql或oracle插入数据时进行md5加密
  11. Anaconda for win10下载与安装
  12. balancap/SSD-Tensorflow使用及训练预测自己的数据集
  13. 小白通过JDBC在AndroidStudio一步步来访问MYSQL数据库
  14. 攻防世界 WEB mfw
  15. 解析机器人视觉系统的神奇之处
  16. epub转pdf网站推荐
  17. 力扣—— 19. 删除链表的倒数第 N 个结点(java)、剑指 Offer 22. 链表中倒数第k个节点(java)
  18. 创新型中小企业认定条件有哪些?
  19. PP.io的三个阶段,“强中心”——“弱中心”——“去中心”
  20. IC618的资源分享及IC618电路显示黄色问题

热门文章

  1. 多线程(十)多线程编程示例
  2. javaEE+ssm医院固定资产设备仪器采购管理系统springboot
  3. python的try和except用法_try except(多个except)多异常处理
  4. SEO基础之1-概念和背景
  5. 北大旁听生中的历史名人
  6. filter函数|python
  7. 服务器安全狗V4.0.05932 小版本更新
  8. asp23粉末钢生锈吗_ASP-23钢材特性
  9. 软件测试基础-(如何设计一个好的测试用例)
  10. GXT 3.1.1 的VBoxLayoutContainer 高度BUG