| More

Here are the steps in installing and configuring AWstats in Tomcat Web Server


1.    Download awstats.war from the internet
2.    Since Tomcat disabled by default the CGI executions, we need to enable it by renaming the file servlets-cgi.renametojar to servlets-cgi.jar
[Tomcat_installation_path] = /usr/local/apache-tomcat-5.5.20

#cd /usr/local/apache-tomcat-5.5.20/server/lib
#mv servlets-cgi.renametojar servlets-cgi.jar

3.    Install AWStats
Since it is already a .war file, no need to install it by hand, you just need to copy this file to [Tomcat_installation_path]/webapps folder

#cp awstats.war [Tomcat_installation_path]/webapps

It would create an [Tomcat_installation_path]/webapps/awstats folder after copied.

4.    Configure AWStats
Let say our domain is www.mydomain.com

#cd /etc
#mkdir awstats
#cd [Tomcat_installation_path]/webapps/awstats/WEB-INF/cgi-bin
#cp awstats.model.conf /etc/awstats/awstats.www.mydomain.com.conf

5.    Edit awstats.conf
#vi /etc/awstats/awstats.www.mydomain.com.conf

Look for the line in the configuration and change the values as shown below:

LogSeparator=” ”

6.    Update Site Statistics
Here you have two choices:
1.    Set AllowToUpdateStatsFromBrowser=1 in awstats.www.mydomain.com.conf file, see above. This will allow updating from the web browser with: http://www.mydomain.com/awstats/cgi-bin/awstats.pl?config=www.mydomain.com&update=1.
2.    Using SSH, go to [Tomca_install]/webapps/awstats/WEB-INF/cgi-bin folder and run perl awstats.pl -config=www.mydomain.com -update.
#/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=www.mydomain.com -update
Create/Update database for config “/etc/awstats/awstats.www.mydomain.com.conf” by AWStats version 6.6 (build 1.887)From data in log file “/var/log/httpd/www.freelinuxtutorials-combined_log”…
Phase 1 : First bypass old records, searching new record…
Direct access after last parsed record (after line 10471)
Jumped lines in file: 10471
Found 10471 already parsed records.
Parsed lines in file: 160
Found 0 dropped records,
Found 0 corrupted records,
Found 0 old records,
Found 160 new qualified records.

7.View Site Statistics

Access it using your favorite browser. Type

8.Create crontab script in order to update the  log file analysis
#crontab –e

add this line

0 * * * * /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=www.mydomain.com -update > /root/awstatsjob/awstats.log

9. You can follow “Installation of GeoIP Information for AWStats” documentation to have a country information on your web/mail/ftp statistics.

10 Responses to “Installation and Configuration of AWStats on Tomcat Web Server”

  1. pokemon go hack

    on November 28 2016

    of course like yⲟur web-site but yⲟu need to check the spelling on seᴠeral of yoսr posts.
    Many of them ɑre rife with spelling issues and I find іt vᥱry bothersome tⲟ teⅼl thhe truth
    oon the othеr һand I աill surely come back again.

  2. 澳門百家樂

    on February 7 2017

    Please let me know if you’re looking for a article writer for your blog. You have some really good posts and I believe I would be a good asset. If you ever want to take some of the load off, I’d really like to write some articles for your blog in exchange for a link back to mine. Please send me an email if interested. Cheers!

  3. 台灣運動彩券

    on February 7 2017

    Great weblog right here! Also your web site a lot up fast! What host are you the usage of? Can I get your associate link on your host? I want my web site loaded up as quickly as yours lol

  4. 八方娛樂城

    on February 7 2017

    Well I truly liked reading it. This subject offered by you is very constructive for correct planning.

  5. 台灣彩券賓果

    on February 7 2017

    Awsome site! I am loving it!! Will come back again. I am bookmarking your feeds also.

  6. 賓果開獎

    on February 7 2017

    What i do not realize is in fact how you are now not actually much more smartly-appreciated than you might be right now. You are so intelligent. You already know thus significantly with regards to this subject, produced me individually imagine it from a lot of numerous angles. Its like men and women aren’t interested until it is one thing to do with Lady gaga! Your own stuffs outstanding. At all times maintain it up!

  7. 運動彩券投注站

    on February 7 2017

    Excellent post. I used to be checking constantly this blog and I am impressed! Very helpful info specially the last phase 🙂 I maintain such info much. I was seeking this certain info for a long time. Thank you and best of luck.

  8. Faith Esmond

    on November 17 2018

    You’re so awesome! I don’t suppose I have read anything like that before. So nice to discover someone with some original thoughts on this subject. Really.. many thanks for starting this up. This website is something that is required on the internet, someone with some originality!

  9. Filomena Stolp

    on November 19 2018

    whoah this weblog is wonderful i really like reading your articles. Keep up the good work! You realize, many individuals are hunting round for this info, you could help them greatly.

  10. situs Domino99 Online

    on January 11 2019

    Thanks on your marvelous posting! I really enjoyed reading it, you
    happen to be a great author.I will always bookmark your blog and will eventually come back soetime soon. I want to encourage
    you to ultimately continie your great job, have a nice day!

Comment RSS · TrackBack URI

Leave a comment

Name: (Required)

E-mail: (Required)




About FLT

This site is dedicated to everyone who likes to learn and explore the beautiful world of Linux. If you have comments and suggestions, please feel free to email at freelinuxtutorials@gmail.com. I am happy to serve and share things esp. that is free and enjoyable as Linux.