blog:configure_awstats_on_debian_webserver
| Next revision | Previous revision | ||
| blog:configure_awstats_on_debian_webserver [2010-06-29 15:39] – created brb | blog:configure_awstats_on_debian_webserver [2010-10-24 10:29] (current) – brb | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| AWStats on Debian | AWStats on Debian | ||
| - | * Install AWStats | + | Install AWStats |
| + | aptitude update | ||
| + | aptitude awstats | ||
| - | aptitude update | + | Configure the apache2 for awstats |
| - | aptitude | + | |
| - | * Configure the apache2 for awstats | + | Copy configuration file for apache2. |
| - | * Copy configuration file for apache2. | + | cp / |
| - | cp /usr/share/doc/awstats/ | + | Then edit /etc/awstats/ |
| - | * | + | LogFile="/ |
| + | SiteDomain=" | ||
| + | LogFormat=1 | ||
| - | Then edit /etc/awstats/awstats.conf file and make sure the file contains (double check the apache2 | + | Now change a permission on apache log file |
| + | chmod o+r /var/log/apache2/access.log | ||
| - | LogFile="/ | + | Make it a default that access.log |
| - | SiteDomain=" | + | |
| - | LogFormat=1 | + | |
| - | * Now change a permission | + | Locate the awstats_updateall.pl script (it is in / |
| - | chmod o+r / | + | Edit the / |
| - | + | create 644 root adm | |
| - | * Make it a default that access.log has these permissions. | + | prerotate |
| - | * | + | nice / |
| - | + | ||
| - | | + | |
| - | + | ||
| - | create 644 root adm | + | |
| - | + | ||
| - | * And | + | |
| - | + | ||
| - | prerotate | + | |
| - | / | + | |
| endscript | endscript | ||
| - | * Final file should look similar to : | + | Final file should look similar to : |
| + | < | ||
| / | / | ||
| weekly | weekly | ||
| Line 50: | Line 44: | ||
| sharedscripts | sharedscripts | ||
| prerotate | prerotate | ||
| - | | + | |
| postrotate | postrotate | ||
| if [ -f / | if [ -f / | ||
| Line 57: | Line 51: | ||
| endscript | endscript | ||
| } | } | ||
| + | </ | ||
| - | * Reload apache | + | Add the update command to cron.hourly: |
| - | + | | |
| - | /etc/init.d/apache2 reload | + | |
| - | + | ||
| - | * And visit: | + | |
| - | http://localhost/ | + | Reload apache |
| + | | ||
| - | * | + | And visit: |
| + | http:// | ||
| - | | + | To make it easier to remember the address you can edit / |
| + | RedirectMatch ^/logs / | ||
| - | RedirectMatch ^/logs /cgi-bin/ | + | Now you can access the awstats statistics by going to |
| + | http://www.mysite.com/logs | ||
| - | * Now you can access | + | If you have a lot of old compressed logfiles that you would to include, set the logfile path to: |
| + | LogFile=" | ||
| - | http://www.mysite.com/logs | + | And update the database. This will incorporate all old log entries. Don't forget to switch back to the last logfile! |
| - | * Done. | + | Ref: http://wiki.debian.org/ |
| - | {{tag>}} | + | {{tag>linux apache awstats}} |
| ~~LINKBACK~~ | ~~LINKBACK~~ | ||
| ~~DISCUSSION~~ | ~~DISCUSSION~~ | ||
blog/configure_awstats_on_debian_webserver.1277818777.txt.gz · Last modified: 2010-06-29 15:39 by brb
