hosting:~# ls -l /var/log/apache2/users/
итого 1321
-rw-r----- 1 root root 1343523 Дек 18 16:11 admin.hosting.example.com-access.log
-rw-r----- 1 root root 831 Дек 18 15:55 admin.hosting.example.com-error.log
Полный путь к файлу будет /var/log/apache2/users/admin.hosting.example.com-access.log
Правим строки в файле:
hosting:~# nano /etc/awstats/awstats.example.com.conf
LogFile="/var/log/apache2/users/admin.hosting.example.com-access.log" //полный путь к лог-файлу доступа
LogType=W
LogFormat=1
LogSeparator=" "
SiteDomain="example.com"
HostAliases="example.com"
[...]
остальные настройки по умолчанию.
hosting:~# nano /etc/apache2/conf.d/awstats
Alias /awstatsclasses "/usr/share/awstats/lib/"
Alias /awstats-icon/ "/usr/share/awstats/icon/"
Alias /awstatscss "/usr/share/doc/awstats/examples/css"
ScriptAlias /stats/ /usr/lib/cgi-bin/
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Alias /awstats-icon/ "/usr/share/awstats/icon/"
Alias /awstatscss "/usr/share/doc/awstats/examples/css"
ScriptAlias /stats/ /usr/lib/cgi-bin/
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
hosting:~# /usr/lib/cgi-bin/awstats.pl -config=example.com -update
Create/Update database for config "/etc/awstats/awstats.example.com.conf" by AWStats version 6.7 (build 1.892)
From data in log file "/var/log/apache2/users/admin.hosting.example.com-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: 4340
Found 1 dropped records,
Found 0 corrupted records,
Found 0 old records,
Found 4339 new qualified records.
Теперь заходим по адрессу http://example.com/stats/awstats.pl
Комментариев нет:
Отправить комментарий