`
MafiaDada
  • 浏览: 25266 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

Fedora 14: Install Apache log analizer, AWstats.

阅读更多
[1] Install AWstats

[root@www03 ~]#yum -y install awstats


[root@www03 ~]#vi /etc/awstats/awstats.www03.server.world.conf  # this file is already locate (replace your server's name)

# line 122: change
# if your config for log format in httpd.conf is 'combined' Set here '1'
# If log-config is 'common' set here '4', but in this case, some informations can't be get (browser info and so on)
LogFormat=1

# line 153, set your hostname
SiteDomain="www03.server.world"

# line 168: set IP address you'd like to exclude
HostAliases="localhost 127.0.0.1 REGEX[server\.world$] REGEX[^10\.0\.0\.]"

[root@www03 ~]#vi /etc/httpd/conf.d/awstats.conf


# add Alias
Alias /report "/usr/share/awstats/wwwroot/"
<Directory "/usr/share/awstats/wwwroot">
    Options None
    AllowOverride None
    Order allow,deny
    Allow from 127.0.0.1 10.0.0.0/24 # IP address you allow
</Directory>

[root@www03 ~]#/etc/rc.d/init.d/httpd restart

Stopping httpd:[  OK  ]
Starting httpd:[  OK  ]

# generate reports
[root@www03 ~]# /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=www03.server.world -update
Create/Update database for config "/etc/awstats/awstats.www03.server.world.conf" by AWStats version 7.0 (build 1.964)
From data in log file "/var/log/httpd/access_log"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...
Jumped lines in file: 0
Parsed lines in file: 29
Found 0 dropped records,
Found 0 comments,
Found 0 blank records,
Found 0 corrupted records,
Found 0 old records,
Found 29 new qualified records.

# generate HTML from reports
[root@www03 ~]#/usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=www03.server.world -output -staticlink > /usr/share/awstats/wwwroot/index.html

# change cron's setting
[root@www03 ~]#vi /etc/cron.hourly/awstats

#!/bin/bash
# make it comment
# exec /usr/share/awstats/tools/awstats_updateall.pl now -configdir="/etc/awstats" -awstatsprog="/usr/share/awstats/wwwroot/cgi-bin/awstats.pl" > /dev/null
# add
/usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=www03.server.world -update > /dev/null
/usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=www03.server.world -output -staticlink > /usr/share/awstats/wwwroot/index.html

exit 0

[2] Access to 'http://(your server's name or IP address/)/report/', then follwing sacreen is shown and it's possible to see httpd's log.


Reference: http://www.server-world.info/en/note?os=Fedora_14&p=httpd&f=11
分享到:
评论

相关推荐

    Wiley.Publishing.Fedora.Linux.Toolbox.1000+.Commands.for.Fedora.CentOS.and.Red.Hat.Power.Users.and.Red.Hat.Power.Users.2008.pdf

    Chapter 14: Locking Down Security . . . . . . . .247 Appendix A: Using vi or Vim Editors . . . . . . . .263 Appendix B: Shell Special Characters and Variables . . . .271 Appendix C: Getting ...

    [Fedora.Linux.宝典.2010版.PDF].Fedora.Bible.2010.Edition-Featuring.Fedora.Linux.12.pdf

    Chapter 14: Computer Security Issues. Chapter 15: Connecting to the Internet. Chapter 16: Setting Up Printers and Printing. Chapter 17: Setting Up a File Server. Chapter 18: Setting Up a Mail ...

    宝塔linux面板常用命令大全

    Fedora安装脚本 wget -O install.sh http://download.bt.cn/install/install_6.0.sh && bash install.sh 管理宝塔 宝塔工具箱(包含下列绝大部分功能 直接ssh中执行bt命令 仅限6.x以上版本面板) bt 更多内容请下载...

    Fedora9下安装mplayer成功需要的4个文件

    Fedora9下安装mplayer成功需要的4个文件: 下载下列四个文件放到/root/download/mplayer/下 MPlayer-1.0rc2.tar 下载:http://www.mplayerhq.hu/MPlayer/releases/ 编解码codecs:all-20071007.tar.bz2、windows-...

    编译安装zabbix-2.4.7

    1. 测试环境 VMware 10.0 CentOS release 6.6 (Final) i386 ...https://mgrepl.fedorapeople.org/man_selinux/Fedora18/zabbix.html http://httpd.apache.org/docs/2.2/ #源码包 http://www.zabbix.com/download.php

    《Linux宝典 2010版》(Wiley Linux Bible 2010 Edition)(Christopher Negus)文字版

    Chapter 14: Running a Mail Server. Chapter 15: Running a Print Server. Chapter 16: Running a File Server. Part V: Choosing and Installing Different Linux Distributions. Chapter 17: Running Ubuntu ...

    rhel系列系统升级内核源

    内部包含elrepo软件包(用于升级红帽操作系统等使用YUM/DNF软件包管理器的操作系统,除Fedora,alinux等版本号不同于rhel的系统)的阿里云下载源,请将它放入/etc/yum.repos.d目录,使用yum或dnf install kernel-ml ...

    vim安装与使用

    例如,在Ubuntu或Debian上使用`sudo apt-get install vim`,在Fedora或CentOS上使用`sudo yum install vim`。 2. **在macOS中**:通过Homebrew安装,输入`brew install vim`。 3. **在Windows中**:可以从官方网站...

    apache-tomcat-9.0.24.tar.gz

    Apache Tomcat是一个开源的Java Servlet容器,主要用于部署和运行Java Web应用程序。在Linux系统中配置Apache Tomcat 9.0.24环境,首先要确保你的系统已经安装了Java Development Kit (JDK)。JDK是Java编程语言的...

    java: xcb_xlib.c:50: xcb_xlib_unlock: Assertion `c->xlib.lock' failed

    在fedora 8 test 3里面的包是这两个: rpm -e --nodeps libX11-1.1.3-4.fc8 rpm -e --nodeps libX11-devel-1.1.3-4.fc8 第二:安装以下两个rpm包,到rpm serch网站下载这两个rpm包。连接RPM Serch网站 rpm -ivh ...

    操作系统安全:var log syslog分析.docx

    /var/log/syslog分析 Linux日志简介 Linux系统拥有非常灵活和强大的日志功能,可以保存几乎所有的操作记录,并可以从中检索出我们需要的信息。 大部分Linux发行版默认的日志守护进程为syslog,位于 /etc/syslog 或 /...

    Fedora-14-i386-DVD Fedora-14-x86_64-DVD Fedora-14-i686-DVD

    前段时间我在网上fadora 14资源找到的,其中前三个是从普通网站上找到的,分别是Fedora-14-i386-DVD,Fedora-14-x86_64-DVD,Fedora-14-i686-Live-Desktop;后两个种子是在官网找到的,分别是:Fedora-14-i386-DVD....

    coLinux 0.7.9 DEVTMPFS

    People can install coLinux with Debian/Fedora/Gentoo and some other Linux over Win-7. You can install a VNC in Linux and connect it via VNC Viewer, works like Remote Server. It's a pity that the ...

    GRUB4DOS .RAR

    6.重启,选择"GRUB” ,再选择"Install Fedora 11”,即可进入安装界面。 7.安好系统后,先不要急着装这装那,你要做的应该是拿起那本使用指南,好好了解一下这个Fedora-11-i386-DVD 的新特性。

    fedora 系统安装GMT

    Fedora 系统安装 GMT 在 Fedora 系统中安装 GMT 需要几个步骤,包括下载安装包、解压安装包、安装 NetCDF 和 GMT、配置环境变量等。下面将逐步介绍这些步骤。 一、下载安装包 首先,需要下载以下安装包: * ...

    Name : ncurses-devel Version : 5.7

    Install the ncurses-devel package if you want to develop applications which will use ncurses. Use the following compiler flags to build against the ncurses library: -lncurses (compile and link ...

    nix环境高级编程 代码编译 软件包

    sudo apt-get install libbsd-dev 2) fedora, redhat, centos 2.1) 下载两个包 2.1a) i386 ftp://ftp.univie.ac.at/systems/linux/fedora/epel/6/i386/libbsd-0.6.0-1.el6.i686.rpm ftp://ftp.univie.ac.at/systems/...

    Python库 | fedmsg_meta_fedora_infrastructure-0.15.10.tar.gz

    资源分类:Python库 所属语言:Python 资源全名:fedmsg_meta_fedora_infrastructure-0.15.10.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059

    解决Linux上MongoDB启动脚本错误---env: /etc/init.d/mongodb : no such file or directory

    日志通常位于`/var/log/mongodb/mongod.log`。通过日志,可以获取更具体的错误信息,帮助诊断问题。 8. **安全设置** 如果MongoDB是作为守护进程运行,还需要考虑安全性,如设置适当的用户权限、启用访问控制和...

    Fedora3x版本适用的网易云音乐rpm包(repo)

    netease-cloud-music] name=Copr repo for netease-cloud-music owned by vitzy baseurl=https://download.copr.fedorainfracloud.org/results/vitzy/netease-cloud-music/fedora-$releasever-$basearch/ type=rpm-...

Global site tag (gtag.js) - Google Analytics