Awstats on 1&1 Linux Root Server

Feb 11, 2006 by     1 Comment     Posted under: Internet, IT, Server Diary

Plesk 7.5 for Windows comes with Awstats, why not Linux version? Who knows, ask the developers. It is said on one of the forum page that Plesk 8.0 for Linux will come with Awstats supported. Again, who knows when it will be out.

So instead of waiting for Plesk to integrate Awstats, I just want it working. Several things to notice while installing Awstats on the FC2 Root Servers that 1&1 is shipping:

  1. Extract the source and place them at /usr/local/awstats as the installer will expect itself to be there.
  2. When asked to locate httpd.conf, feed it /etc/httpd/conf/httpd.include instead. If you give httpd.conf, changes made will be erased next time you made any change to your domain structures through Plesk.
  3. Edit httpd.include and add this block to the awstats’s Directory block:
    	<IfModule mod_perl.c>
    	<Files ~ (\\.pl$)>
    		SetHandler perl-script
    		PerlHandler ModPerl::Registry
    		Options ExecCGI
    		allow from all
    		PerlSendHeader On
    	</Files>
    	</IfModule>
    

    As this will make sure perl scipts runs under 1&1′s and Plesk’s configuration.

  4. Logs are located under /home/httpd/vhosts/[domain]/statistics/log/access_log, notice if you’re not running the update script (awstats_updateall.pl whichcalls awstats.pl) as root, you’ll have to chmod o+x on these directories.
  5. Awstats expect (by default) to write into /var/lib/awstats so make sure it’s there and writable for update script owner.
  6. If you want to import old data, specify the target log file access_log.processed, and update. Then change the target log file back to access_log to keep it current.
  7. Because the data get processed by Plesk’s default stats engine, we want to regularily check access_log to keep the data updated (so it won’t be moved into .processed before we access them). Use crontab -e to automate this process every hour.

It’s working on mine now.

1 Comment + Add Comment

  • 最好不要讓外面碰的到 awstats 的 cgi ,改用 crontab 跑靜態網頁比較好…(不良紀錄太多了)

Got anything to say? Go ahead and leave a comment!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>