Awstats on 1&1 Linux Root Server
Posted in IT, Internet, Server Diary | By tarotoast |
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:
- Extract the source and place them at /usr/local/awstats as the installer will expect itself to be there.
- 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.
- 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.
- 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.
- Awstats expect (by default) to write into /var/lib/awstats so make sure it’s there and writable for update script owner.
- 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.
- 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.
February 11th, 2006 at 11:02 am
最好不要讓外面碰的到 awstats 的 cgi ,改用 crontab 跑靜態網頁比較好…(不良紀錄太多了)