Apacheアクセスログ解析(AWStats)

最終更新日: 2017.05.13

<<トップページ <<新着情報 <<サイト内検索 <<CentOSで自宅サーバー構築 <<Scientific Linuxで自宅サーバー構築

■概要

AWStatsを利用してApacheのアクセスログを解析し、Webサイトへのアクセス統計をWebブラウザから参照できるようにする。⇒当サイトのサンプル


■AWStatsインストール

[root@fedora ~]# yum -y install awstats ← AWStatsインストール

[root@fedora ~]# vi /usr/share/awstats/wwwroot/cgi-bin/awstats.pl ← awstats.pl編集
※レポートの日付形式を「月 2月 2010」から「2010年 2月」へ変更
                                if ( $MonthRequired eq 'all' ) {
                                        print "$Message[6] $YearRequired";
                                }
                                else {
                                        print
                                          #"$Message[5] $MonthNumLib{$MonthRequired} $YearRequired"; ← 行頭に#を追加してコメントアウト
                                          "$YearRequired$Message[6] ".$MonthNumLib{$MonthRequired}; ← 追加(日付をYYYY年 MM月形式にする)
                                }

                        print( $MonthRequired eq 'all'
                                ? "$Message[6] $YearRequired"
                                #: "$Message[5] " ← 行頭に#を追加してコメントアウト
                                  #. $MonthNumLib{$MonthRequired} ← 行頭に#を追加してコメントアウト
                                  #. " $YearRequired" ← 行頭に#を追加してコメントアウト
                                : "$YearRequired$Message[6] $MonthNumLib{$MonthRequired}" ← 追加(日付をYYYY年 MM月形式にする)
                        );

                                        #print "$MonthNumLib{$monthix}<br />$YearRequired"; ← 行頭に#を追加してコメントアウト
                                        print "$YearRequired$Message[6]<br />$MonthNumLib{$monthix}"; ← 追加(日付をYYYY年 MM月形式にする)
                                        
                                        #print "$MonthNumLib{$monthix} $YearRequired"; ← 行頭に#を追加してコメントアウト
                                        print "$YearRequired$Message[6] $MonthNumLib{$monthix}"; ← 追加(日付をYYYY年 MM月形式にする)

■AWStats設定

(1)AWStats設定
[root@fedora ~]# rm -f /etc/awstats/awstats.localhost.localdomain.conf ← 不要な設定ファイルを削除※

[root@fedora ~]# rm -f /etc/awstats/awstats.`hostname`.conf ← 不要な設定ファイルを削除※

※インストール時に自動で作成されるこれらの設定ファイルを放置しておくと、/etc/cron.hourly/awstatsにより1時間おきに
自動実行されるAWStatsデータベース更新処理の処理対象となってしまって無駄な処理が動作してしまうので、削除しておく

[root@fedora ~]# cp /etc/awstats/awstats.model.conf /etc/awstats/awstats.fedorasrv.com.conf
 ← 設定ファイルをサンプルよりコピー

[root@fedora ~]# vi /etc/awstats/awstats.fedorasrv.com.conf ← 設定ファイル編集
# "SiteDomain" must contain the main domain name, or the main intranet web
# server name, used to reach the web site.
# If you share the same log file for several virtual web servers, this
# parameter is used to tell AWStats to filter record that contains records for
# this virtual host name only (So check that this virtual hostname can be
# found in your log file and use a personalized log format that include the
# %virtualname tag).
# But for multi hosting a better solution is to have one log file for each
# virtual web server. In this case, this parameter is only used to generate
# full URL's links when ShowLinksOnUrl option is set to 1.
# If analysing mail log, enter here the domain name of mail server.
# Example: "myintranetserver"
# Example: "www.domain.com"
# Example: "ftp.domain.com"
# Example: "domain.com"
#
SiteDomain="localhost.localdomain"
↓
SiteDomain="fedorasrv.com" ← Webサーバー名を指定

# Enter here all other possible domain names, addresses or virtual host
# aliases someone can use to access your site. Try to keep only the minimum
# number of possible names/addresses to have the best performances.
# You can repeat the "SiteDomain" value in this list.
# This parameter is used to analyze referer field in log file and to help
# AWStats to know if a referer URL is a local URL of same site or an URL of
# another site.
# Note: Use space between each value.
# Note: You can use regular expression values writing value with REGEX[value].
# Note: You can also use @/mypath/myfile if list of aliases are in a file.
# Example: "www.myserver.com localhost 127.0.0.1 REGEX[mydomain\.(net|org)$]"
#
HostAliases="127.0.0.1 localhost REGEX[^192\.168\.1\.]" ← 自ホストおよび内部(例:192.168.1.x)からのアクセスをアクセス元(リファラ)から除外する

# Do not include access from clients that match following criteria.
# If your log file contains IP addresses in host field, you must enter here
# matching IP addresses criteria.
# If DNS lookup is already done in your log file, you must enter here hostname
# criteria, else enter ip address criteria.
# The opposite parameter of "SkipHosts" is "OnlyHosts".
# Note: Use space between each value. This parameter is not case sensitive.
# Note: You can use regular expression values writing value with REGEX[value].
# Change : Effective for new updates only
# Example: "127.0.0.1 REGEX[^192\.168\.] REGEX[^10\.]"
# Example: "localhost REGEX[^.*\.localdomain$]"
# Default: ""
#
SkipHosts="127.0.0.1 localhost REGEX[^192\.168\.1\.]" ← 自ホストおよび内部(例:192.168.1.x)からのアクセスをアクセス元(クライアント)から除外する

# If you want to have hosts reported by name instead of ip address, AWStats
# need to make reverse DNS lookups (if not already done in your log file).
# With DNSLookup to 0, all hosts will be reported by their IP addresses and
# not by the full hostname of visitors (except if names are already available
# in log file).
# If you want/need to set DNSLookup to 1, don't forget that this will reduce
# dramatically AWStats update process speed. Do not use on large web sites.
# Note: Reverse DNS lookup is done on IPv4 only (Enable ipv6 plugin for IPv6).
# Note: Result of DNS Lookup can be used to build the Country report. However
# it is highly recommanded to enable the plugin 'geoipfree' or 'geoip' to
# have an accurate Country report with no need of DNS Lookup.
# Possible values:
# 0 - No DNS Lookup
# 1 - DNS Lookup is fully enabled
# 2 - DNS Lookup is made only from static DNS cache file (if it exists)
# Default: 2
#
DNSLookup=2
↓
DNSLookup=1 ← アクセス元の名前解決を行う(アクセス元をIPアドレスではなくホスト名で表示する)

# Show authenticated users chart
# Context: Web, Streaming, Ftp
# Default: 0, Possible column codes: PHBL
ShowAuthenticatedUsers=0
↓
ShowAuthenticatedUsers=PHBL ← 認証ユーザを表示する場合

# Plugin: GeoIPfree
# Perl modules required: Geo::IPfree version 0.2+ (from Graciliano M.P.)
# Country chart is built from an Internet IP-Country database.
# This plugin is useless for intranet only log files.
# Note: You must choose between using this plugin (need Perl Geo::IPfree
# module, database less up to date) or the GeoIP plugin (need Perl Geo::IP
# module from Maxmind, database more up to date).
# Note: Activestate provide a corrupted version of Geo::IPfree 0.2 Perl
# module, so install it from elsewhere (from www.cpan.org for example).
# This plugin reduces AWStats speed of 10% !
#
#LoadPlugin="geoipfree"
↓
LoadPlugin="geoipfree" ← コメント解除(アクセス元国情報を詳細に取得)

# When AWStats builds HTML links in its report pages, it starts those links
# with "http://". However some links might be HTTPS links, so you can enter
# here the root of all your HTTPS links. If all your site is a SSL web site,
# just enter "/".
# This parameter is not used if ShowLinksOnUrl is 0.
# Example: "/shopping"
# Example: "/"
# Default: ""
#
UseHTTPSLinkForUrl="/" ← /を指定Webサーバー間通信内容暗号化を導入している場合のみ

[root@fedora ~]# yum -y install perl-Geo-IPfree ← GeoIPfreeプラグイン動作に必要なPerlモジュールインストール

※yumでインストールできない場合はRPMをダウンロードしてインストール
[root@fedora ~]# wget http://pkgs.repoforge.org/perl-Geo-IPfree/perl-Geo-IPfree-0.8-1.el6.rf.noarch.rpm ← perl-Geo-IPfreeダウンロード

※最新版のURLはダウンロードページで確認すること

[root@fedora ~]# yum -y localinstall --nogpgcheck perl-Geo-IPfree-0.8-1.el6.rf.noarch.rpm ← perl-Geo-IPfreeインストール

[root@fedora ~]# rm -f perl-Geo-IPfree-0.8-1.el6.rf.noarch.rpm ← ダウンロードしたファイルを削除

(2)日本の検索エンジン対応
日本の検索エンジンが検索エンジンとして集計されるようにする
[root@fedora ~]# vi /usr/share/awstats/lib/search_engines.pm ← search_engines.pm編集
@SearchEnginesSearchIDOrder_list1=(
以下を追加
# Japanese Search Engines
'google\.co\.jp',
'66\.249\.(89\.99|93\.104)',
'66\.102\.(7\.99|7\.104|9\.104|11\.104)',
'64\.233\.(161\.104|179\.104|167\.104|183\.104|187\.104)',
'72\.14\.(203|205|207|209|221|235|253)\.104',
'216\.239\.(37\.104|39\.104|41\.104|51\.104|57\.104|59\.104)',
'search\.biglobe\.ne\.jp',
'goo\.ne\.jp',
'nifty\.com',
'search\.msn\.co\.jp',
'search\.odn\.ne\.jp',
'excite\.ne\.jp',
'naver\.co\.jp',
'fresheye\.com',
'tocc\.co\.jp',
'infoseek\.co\.jp',
'cache\.yahoofs\.jp',
'search\.livedoor\.com',
'www\.ceek\.jp',
'www\.bing\.com',
's\.luna\.tv',
'72\.14\.207\.99',
'209\.85\.165\.104',
'209\.85\.129\.104',
'209\.85\.129\.132',
'209\.85\.(173|175)\.104',
'74\.125\.47\.132',
'74\.125\.77\.132',
'74\.125\.95\.132',
'74\.125\.153\.132',
'74\.125\.155\.132',
'72\.14\.235\.132',
'66\.249\.89\.104',

%NotSearchEnginesKeys=(
以下を追加
# For Japanese Search Engines
'infoseek\.co\.jp'=>'at\.infoseek\.co\.jp',
'goo\.ne\.jp'=>'members\.goo\.ne\.jp',

%SearchEnginesHashID = (
以下を追加
# Japanese Search Engines
'google\.co\.jp','googlejapan',
'66\.249\.(89\.99|93\.104)','googlejapan',
'66\.102\.(7\.99|7\.104|9\.104|11\.104)','googlejapan',
'64\.233\.(161\.104|179\.104|167\.104|183\.104|187\.104)','googlejapan',
'72\.14\.(203|205|207|209|221|235|253)\.104','googlejapan',
'216\.239\.(37\.104|39\.104|41\.104|51\.104|57\.104|59\.104)','googlejapan',
'search\.biglobe\.ne\.jp','biglobe',
'goo\.ne\.jp','goo',
'nifty\.com','nifty',
'search\.msn\.co\.jp','msnjapan',
'search\.odn\.ne\.jp','odn',
'excite\.co\.jp','excitejapan',
'naver\.co\.jp','naver',
'fresheye\.com','fresheye',
'tocc\.co\.jp','tocc',
'infoseek\.co\.jp','infoseek',
'cache\.yahoofs\.jp','yahoocache',
'search\.livedoor\.com','livedoor',
'www\.ceek\.jp','ceek',
'www\.bing\.com','bing',
's\.luna\.tv','lunascape',
'72\.14\.207\.99','googlejapan',
'209\.85\.165\.104','googlejapan',
'209\.85\.129\.104','googlejapan',
'209\.85\.129\.132','googlejapan',
'209\.85\.(173|175)\.104','googlejapan',
'74\.125\.47\.132','googlejapan',
'74\.125\.77\.132','googlejapan',
'74\.125\.95\.132','googlejapan',
'74\.125\.153\.132','googlejapan',
'74\.125\.155\.132','googlejapan',
'72\.14\.235\.132','googlejapan',
'66\.249\.89\.104','googlejapan',

%SearchEnginesKnownUrl=(
以下を追加
# Japanese Search Engines
'googlejapan','(p|q)=',
'biglobe','q=',
'goo','MT=',
'nifty','Text=',
'msnjapan','(q|MT)=',
'odn','Querystring=',
'excitejapan','search=',
'naver','query=',
'fresheye','kw=',
'tocc','QRY=',
'infoseek','qt=',
'yahoocache','w=',
'livedoor','q=',
'ceek','q=',
'clusty','query=',

@WordsToCleanSearchUrl= ('act=','annuaire=','btng=','cat=','categoria=','cfg=','cof=','cou=','count=','cp=','dd=','domain=','dt=','dw=','enc=','exec=','geo=','hc=','height=','hits=','hl=','hq=','hs=','id=','kl=','lang=','loc=','lr=','matchmode=','medor=','message=','meta=','mode=','order=','page=','par=','pays=','pg=','pos=','prg=','qc=','refer=','sa=','safe=','sc=','sort=','src=','start=','style=','stype=','sum=','tag=','temp=','theme=','type=','url=','user=','width=','what=','\\.x=','\\.y=','y=','look=');
↓ 変更
@WordsToCleanSearchUrl= ('act=','annuaire=','btng=','cat=','categoria=','cfg=','cof=','cou=','count=','cp=','dd=','domain=','dt=','dw=','enc=','exec=','geo=','hc=','height=','hits=','hl=','hq=','hs=','id=','kl=','lang=','loc=','lr=','matchmode=','medor=','message=','meta=','mode=','order=','page=','par=','pays=','pg=','pos=','prg=','qc=','refer=','sa=','safe=','sc=','sort=','src=','start=','style=','stype=','sum=','tag=','temp=','theme=','type=','url=','user=','width=','what=','\\.x=','\\.y=','y=','look=','target=','collection=','showSummary=','perPage=','next=','DB=','OPE=','Max=','base=','submit=','SearchType=','SESSIONID=','QUERYRULE=','DISPLAYMIN=','RELURLSWITCH=','SORT=','start=','direct=','relwd=','lk=','svx=','nh=','internet=','DC=','submit0=','DEST=','where=','CCM=','NRS=','UNI=','UD0=','FRS=','sv=','rf=','oq=','col=','act\.search=');

%SearchEnginesHashLib=(
以下を追加
# Japanese Search Engines
'googlejapan','Google Japan',
'biglobe','Biglobe',
'goo','Goo',
'nifty','Nifty',
'msnjapan','MSN Japan',
'odn','ODN',
'excitejapan','Excite Japan',
'naver','Naver',
'fresheye','Fresheye',
'tocc','TOCC/Search',
'infoseek','Infoseek',
'yahoocache','Yahoo Cache',
'livedoor','Livedoor',
'ceek','CEEK.JP',
'bing','Bing',
'lunascape','Lunascape',

■Apache設定

デフォルトではサーバー機からしかアクセス統計を参照できないので、サーバー機以外からもアクセス統計を参照できるようにする場合は、Apacheの設定を変更する。

(1)Apache設定※アクセス統計を外部からも参照できるようにする場合
[root@fedora ~]# vi /etc/httpd/conf.d/awstats.conf ← Apache用AWStats設定ファイル編集
<Directory "/usr/share/awstats/wwwroot">
    Options None
    AllowOverride None
    Order allow,deny
    Allow from 127.0.0.1
    ↓
    Allow from All ← 外部からも参照できるようにする
</Directory>

[root@fedora ~]# /etc/rc.d/init.d/httpd reload ← Apache設定反映
httpd を再読み込み中:                                      [  OK  ]

(2)Apache設定※アクセス統計を内部からのみ参照できるようにする場合
[root@fedora ~]# vi /etc/httpd/conf.d/awstats.conf ← Apache用AWStats設定ファイル編集
<Directory "/usr/share/awstats/wwwroot">
    Options None
    AllowOverride None
    Order allow,deny
    Allow from 127.0.0.1
    Allow from 192.168.1 ← 内部からのみ参照できるようにする
</Directory>

[root@fedora ~]# /etc/rc.d/init.d/httpd reload ← Apache設定反映
httpd を再読み込み中:                                      [  OK  ]

■AWStatsデータベース作成

(1)AWStatsデータベース初期作成
Apacheのログファイルを過去分も含めて全てAWStatsのデータベースに取り込む
[root@fedora ~]# vi awstatsinit.sh ← AWStatsデータベース初期作成スクリプト作成
#!/bin/bash

logfile=`grep ^LogFile /etc/awstats/awstats.$1.conf|sed -e 's/LogFile="\([^ ]*\)"/\1/p' -e d`
for log in `ls $logfile*|sort -r`
do
    `rpm -ql awstats|grep "awstats\.pl"` \
    -config=$1 -update -logfile=$log
done

[root@fedora ~]# sh awstatsinit.sh fedorasrv.com ← AWStatsデータベース初期作成スクリプト実行
※ログ量により時間がかかる
Update for config "/etc/awstats/awstats.fedorasrv.com.conf"
With data in log file "/var/log/httpd/access_log.4"...
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: 123047
 Found 1821 dropped records,
 Found 0 corrupted records,
 Found 0 old records,
 Found 121226 new qualified records.
Update for config "/etc/awstats/awstats.fedorasrv.com.conf"
With data in log file "/var/log/httpd/access_log.3"...
Phase 1 : First bypass old records, searching new record...
Direct access to last remembered record has fallen on another record.
So 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: 130918
 Found 1700 dropped records,
 Found 0 corrupted records,
 Found 0 old records,
 Found 129218 new qualified records.
Update for config "/etc/awstats/awstats.fedorasrv.com.conf"
With data in log file "/var/log/httpd/access_log.2"...
Phase 1 : First bypass old records, searching new record...
Direct access to last remembered record is out of file.
So searching it 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: 128865
 Found 1680 dropped records,
 Found 0 corrupted records,
 Found 0 old records,
 Found 127185 new qualified records.
Update for config "/etc/awstats/awstats.fedorasrv.com.conf"
With data in log file "/var/log/httpd/access_log.1"...
Phase 1 : First bypass old records, searching new record...
Direct access to last remembered record is out of file.
So searching it 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: 115202
 Found 1532 dropped records,
 Found 0 corrupted records,
 Found 0 old records,
 Found 113670 new qualified records.
Update for config "/etc/awstats/awstats.fedorasrv.com.conf"
With data in log file "/var/log/httpd/access_log"...
Phase 1 : First bypass old records, searching new record...
Direct access to last remembered record is out of file.
So searching it 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: 21746
 Found 312 dropped records,
 Found 0 corrupted records,
 Found 0 old records,
 Found 21434 new qualified records.

[root@fedora ~]# rm -f awstatsinit.sh ← AWStatsデータベース初期作成スクリプト削除
※以後のAWStatsデータベースの更新は/etc/cron.hourly/awstatsにより1時間おきに自動実行される

(2)Apacheログローテーション設定
Apacheログファイルローテーション時、AWStatsのデータベースに取り込んでからローテーションを行うようにする
[root@fedora ~]# vi /etc/logrotate.d/httpd ← Apacheログローテーション設定ファイル編集
/var/log/httpd/*log {
    missingok
    notifempty
    sharedscripts
    −−−−追加(ここから)−−−−
    prerotate
        `rpm -ql awstats|grep "awstats_updateall\.pl"` now -confdir="/etc/awstats" \
        -awstatsprog="`rpm -ql awstats|grep "awstats\.pl"`" >/dev/null
    endscript
    −−−−追加(ここまで)−−−−
    postrotate
        /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
    endscript
}

■AWStats確認

http://Webサーバー名/awstats/awstats.plへアクセスしてアクセス統計ページが表示されることを確認

■アクセス統計ページHTML版の作成

awstats.plは、実行するたびにAWStatsのデータベースからログ情報を入力してアクセス統計ページを作成するため、サーバーに負荷がかかることから、awstats.plは内部からのみ実行できるようにする。また、万が一、AWStatsのデータベースが失われた場合、アクセス統計が見れなくなってしまうため、アクセス統計ページをHTMLで作成するようにする。

(1)アクセス統計ページHTML版格納ディレクトリ設定
[root@fedora ~]# mkdir /var/www/awstatsreport ← HTML版格納ディレクトリ作成

[root@fedora ~]# vi /etc/httpd/conf.d/awstatsreport.conf ← HTML版格納ディレクトリアクセス設定ファイル作成
Alias /awstatsreport "/var/www/awstatsreport"
以下はアクセス統計を外部に公開しない場合のみ指定
<Location "/awstatsreport">
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
    Allow from 192.168.1 ← 内部ネットワークアドレスを指定
</Location>

(2)awstats.plアクセス制限
awstats.plは負荷がかかるので、内部からのみアクセスできるようにしておく
[root@fedora ~]# vi /etc/httpd/conf.d/awstats.conf ← Apache用AWStats設定ファイル編集
以下を最終行へ追加
<Files "awstats.pl">
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
    Allow from 192.168.1 ← 内部ネットワークアドレスを指定
</Files>

(3)Apache設定反映
[root@fedora ~]# /etc/rc.d/init.d/httpd reload ← Apache設定反映
httpd を再読み込み中:                                      [  OK  ]

(4)アクセス統計ページHTML版作成
[root@fedora ~]# vi awstatsreport.sh ← アクセス統計ページHTML版作成スクリプト作成
#!/bin/bash

site=$1
dir=$2

reportbuild() {
    # AWStatsデータベース更新中断時ロックファイル残存対処(ここから)
    if [ -f /tmp/awstats.$site.lock ]; then
        ps -p `cat /tmp/awstats.$site.lock |awk '{print $6}'`
        if [ $? -ne 0 ]; then
            echo /tmp/awstats.$site.lock removed >&2
            rm -f /tmp/awstats.$site.lock 
        fi
    fi
    # AWStatsデータベース更新中断時ロックファイル残存対処(ここまで)
    `rpm -ql awstats|grep "awstats_buildstaticpages\.pl"` \
    -awstatsprog="`rpm -ql awstats|grep "awstats\.pl"`"\
    -config=$site -update -lang=jp -dir=$dir \
    -year=$YEAR -month=$MONTH -builddate=$YEAR$MONTH
    # 個別ページリンク切れ対処(ここから)
    sed -i "s/href=\"${site}/href=\"awstats.${site}/g" \
    $dir/awstats.$site.$YEAR$MONTH.html
    # 個別ページリンク切れ対処(ここまで)
    if [ "$YEAR$MONTH" = $(date +%Y%m) ]; then
        mv $dir/awstats.$site.$YEAR$MONTH.html $dir/index.html
    else
        mv $dir/awstats.$site.$YEAR$MONTH.html $dir/$YEAR$MONTH.html
    fi
}

ls $dir/* > /dev/null 2>&1
if [ $? -eq 0 ]; then
    YEAR=`date --date '1 days ago' +%Y`
    MONTH=`date --date '1 days ago' +%m`
    reportbuild
else
    DirData=`grep ^DirData /etc/awstats/awstats.model.conf|awk -F= '{print $2}'|tr -d \"`
    for log in `ls $DirData/awstats*.$site.txt`
    do
        YEAR=`echo $log|cut -d / -f 5|cut -d . -f 1|sed -e 's/awstats..\([^ ]*\)/\1/p' -e d`
        MONTH=`echo $log|cut -d / -f 5|cut -d . -f 1|sed -e 's/awstats\([^ ]*\)..../\1/p' -e d`
        reportbuild
    done
fi



[root@fedora ~]# chmod 700 awstatsreport.sh ← アクセス統計ページHTML版作成スクリプトへ実行権限付加

[root@fedora ~]# ./awstatsreport.sh fedorasrv.com /var/www/awstatsreport ← アクセス統計ページHTML版作成スクリプト実行

(5)アクセス統計ページHTML版確認
http://Webサーバー名/awstatsreport/へアクセスして今月分のアクセス統計ページが表示されることを確認
過去のアクセス統計ページはhttp://Webサーバー名/awstatsreport/年月(YYYYMM).html(例:http://Webサーバー名/awstatsreport/200601.html)へアクセスする

(6)アクセス統計ページHTML版作成定期自動実行設定
[root@fedora ~]# echo "00 00 * * * root /root/awstatsreport.sh fedorasrv.com /var/www/awstatsreport > /dev/null" > /etc/cron.d/awstatsreport
 ← cron登録
毎日00:00にアクセス統計ページHTML版作成スクリプト実行


■関連コンテンツ




▲このページのトップへ戻る

プライバシーポリシー