Apache httpd : ログレポート : AWStats2025/11/14 |
|
アクセスログレポート AWStats をインストールします。 |
|
| [1] | AWstats のインストールと設定です。 |
|
[root@www ~]#
dnf -y install awstats # 50行目 : レポートを生成したいバーチャルホストのログを指定 LogFile="/var/log/httpd/www_access_log" # 126行目 : httpd のログフォーマットが [combined] の場合は [1] # [common] の場合は [4] LogFormat=1 # 157行目 : ホスト名確認 (システムのホスト名が自動設定されている) SiteDomain="www.srv.world" # 172行目 : レポートから除外したいドメイン名や IP アドレスを設定 HostAliases="REGEX[^.*www\.srv\.world$]"
[root@www ~]#
vi /etc/httpd/conf.d/awstats.conf # 29行目 : 必要に応じてアクセス許可 IP 追記 # デフォルトはローカルホストのみ Require ip 10.0.0.0/24
[root@www ~]#
systemctl reload httpd
# レポート手動出力 ( Cron により一時間毎に自動更新される ) [root@www ~]# /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=$(hostname) -update Create/Update database for config "/etc/awstats/awstats.www.srv.world.conf" by AWStats version 7.9 (build 20230108) 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: 6 Found 0 dropped records, Found 0 comments, Found 0 blank records, Found 3 corrupted records, Found 0 old records, Found 3 new qualified records. |
| [2] | アクセス許可した範囲内の任意のクライアント PC で Web ブラウザを起動し、[(サーバーのホスト名 または IP アドレス/)/awstats/awstats.pl] にアクセスすると、Apache httpd のログレポートが閲覧できます。 |
|
| Sponsored Link |
|
|