| More

Here are the steps in installing AWstats on Apache Web Server as your web log analyzer and statistics:


Assuming VirtualHost setting is already added on the httpd.conf, and the log is customized already for a combined log.

#<VirtualHost support.freelinuxtutorials.com:80>
ServerAdmin webmaster@support.freelinuxtutorials.com
DocumentRoot /home/www/support.freelinuxtutorials.com
ServerName support.freelinuxtutorials.com
ErrorLog /var/log/httpd/support.freelinuxtutorials.com-error_log
CustomLog /var/log/httpd/support.freelinuxtutorials.com-combined_log combined

If not httpd.conf should be modified to customized the log of a particular website

CustomLog /yourlogpath/yourlogfile common
CustomLog /yourlogpath/yourlogfile combined

1.    Download the latest stable awstats.tar.gz  from the internet

#cd /usr/local/
#wget http://prdownloads.sourceforge.net/awstats/awstats-6.7.tar.gz

2.    Uncompress the tarball file and rename the directory to awstats

#tar zxvf awstats-6.7.tar.gz
#mv awstats-6.7 awstats
#cd awstats

It will ask for series of questions, just input the necessary details.


—– AWStats awstats_configure 1.0 (build 1.7) (c) Laurent Destailleur —–
This tool will help you to configure AWStats to analyze statistics for
one web server. You can try to use it to let it do all that is possible
in AWStats setup, however following the step by step manual setup
documentation (docs/index.html) is often a better idea. Above all if:
– You are not an administrator user,
– You want to analyze downloaded log files without web server,
– You want to analyze mail or ftp log files instead of web log files,
– You need to analyze load balanced servers log files,
– You want to ‘understand’ all possible ways to use AWStats…
Read the AWStats documentation (docs/index.html).

—–> Running OS detected: Linux, BSD or Unix

—–> Check for web server install

Enter full config file path of your Web server.
Example: /etc/httpd/httpd.conf
Example: /usr/local/apache2/conf/httpd.conf
Example: c:\Program files\apache group\apache\conf\httpd.conf
Config file path (‘none’ to skip web server setup):

Input the location of your web config

    /etc/httpd/conf/httpd.conf

—–> Check and complete web server config file ‘/etc/httpd/conf/httpd.conf’

—–> Update model config file ‘/usr/local/awstats/wwwroot/cgi-bin/awstats.model.conf’
File awstats.model.conf updated.

—–> Need to create a new config file ?
Do you want me to build a new AWStats config/profile
file (required if first install) [y/N] ?Y

Type Y to create a new awstats config

—–> Define config file name to create
What is the name of your web site or profile analysis ?
Example: www.mysite.com
Example: demo
Your web site, virtual server or profile name:

wherein www.mysite.com is the name of your config file

—–> Define config file path
In which directory do you plan to store your config file(s) ?
Default: /etc/awstats
Directory path to store config file(s) (Enter for default):
    /etc/awstats

Specify the location you want to store your config file

—–> Add update process inside a scheduler
Sorry, configure.pl does not support automatic add to cron yet.
You can do it manually by adding the following command to your cron:
/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=www.mysite.com
Or if you have several config files and prefer having only one command:
/usr/local/awstats/tools/awstats_updateall.pl now
Press ENTER to continue…

Press ENTER to continue (just manual set the crontab script once finish with the installation)

A SIMPLE config file has been created: /etc/awstats/awstats.www.mysite.com.conf
You should have a look inside to check and change manually main parameters.
You can then manually update your statistics for ‘www.mysite.com’ with command:
> perl awstats.pl -update -config=www.mysite.com
You can also read your statistics for ‘www.mysite.com’ with URL:
> http://localhost/awstats/awstats.pl?config=www.mysite.com

Press ENTER to finish…

3.    awstats_configure.pl will then add, if not already present, the following directives to your Apache configuration file
Inspect the httpd.conf file if not added, then add this lines:

# Directives to add to your Apache conf file to allow use of AWStats as a CGI.
# Note that path “/usr/local/awstats/” must reflect your AWStats Installation path.
Alias /awstatsclasses “/usr/local/awstats/wwwroot/classes/”
Alias /awstatscss “/usr/local/awstats/wwwroot/css/”
Alias /awstatsicons “/usr/local/awstats/wwwroot/icon/”
ScriptAlias /awstats/ “/usr/local/awstats/wwwroot/cgi-bin/”
# This is to permit URL access to scripts/files in AWStats directory.
<Directory “/usr/local/awstats/wwwroot”>
Options None
AllowOverride None
Order allow,deny
Allow from all

4.Edit your awstats configuration file based on your web settings.

# vi /etc/awstats/awstats.www.mysite.com.conf

These are the following lines that need to modify

a. LogFile
b. LogType
c. LogFormat
c. SiteDomain

Example config file:


AllowToUpdateStatsFromBrowser=0  (optional, you can set 1 so you can update the stats via the Browser)

4.    Update the statistics database. It is recommended that you update it manually via the command line since the process may be long and it’s easier to solve problems when you can see the command output

#usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=www.mysite.com –update

Update for config “/etc/awstats/awstats.mysite.conf”
With data in log file “/pathtoyourlog/yourlog.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: 225730
Found 122 dropped records,
Found 87 corrupted records,
Found 0 old records,
Found 225521 new qualified records.

Note: to update the old log file, you just need to change the LogFile to the old log file you want to update.

On your /etc/awstats/awstats.www.mysite.com.conf


5. View Site Statistics

Access it using your favorite browser. Type

6. 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.mysite.com -update > /root/awstatsjob/awstats.log

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


1.    Add these lines on httpd.conf to configure htaccess file

#vi /etc/httpd/conf/httpd.conf

# This is to permit URL access to scripts/files in AWStats directory.
<Directory “/usr/local/awstats/wwwroot”>
Options None
AllowOverride None
Order allow,deny
Allow from all

<Directory “/usr/local/awstats/wwwroot/cgi-bin”>
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all

AuthType basic
AuthName “NOC Authentication”
AuthUserFile /etc/awstats/awstats.htpasswd

<Files awstats.pl>
Require valid-user

2.    Configure htpasswd file

#cd /etc/awstats/
#htpasswd –c awstats.htpasswd username

New password:
Re-type new password:
Adding password for user username

3.    Adding new users

To add new users, use the same command without the -c switch

#htpasswd awstats.htpasswd darwin

To delete users, open the htpasswd file and delete the line you want to remove

4.    Test the configuration

Open the browser and then type the URL. If it is successful, you should get a dialog box prompting for your username and password. Type the username/password you configured on your htaccess file


Since we are using vsFTPd as our FTP server, the log file is in xferlog format. Installation is just the same for web statistics except for awstats configuration where LogType is F (stand for FTP) and LogFormat based on your FTP log format

1.    Check your ftp log format

#cd /var/log/
#less xferlog

Take a look at your FTP server log file. You must have a format that match the following example to use
Wed Jan 01 19:29:35 2001 1 102 /home/file1.txt b _ o r username ftp 0 * c


#less /var/log/xferlog
Sun Dec 16 19:57:13 2007 16 561976 /softphone/freelinuxtutorialsSetup.MSI b _ o
a IEUser@ ftp 0 * i

2.    Setup AWStats to analyze FTP log

#vi /etc/awstats/awstats.ftp.conf

Modify the config file (lines below in bold are the important, others can stay in default)

LogFormat=”%time3 %other %host %bytesd %url %other %other %method %other %logname %other %code
%other %other”


58 Responses to “Installation and Configuration of AWStats on Apache Web Server”

  1. chuck

    on March 24 2010

    thanks, your instructions worked like a charm.

  2. admin

    on April 14 2010


  3. giri

    on March 26 2013

    still i have a problem in awstats.can any one help to do awstats. wat log file i have to put ???

  4. giri

    on March 26 2013

    any one plz

  5. gta iv flying mod

    on July 23 2018

    There’s certainly a lot to know about this issue. I really like all of
    the points you’ve made.

  6. best aws training in hyderabad

    on August 7 2018

    brillant piece of information, I had come to know about your web-page from my friend hardkik, chennai,i have read atleast 9 posts of yours by now, and let me tell you, your webpage gives the best and the most interesting information. This is just the kind of information that i had been looking for, i’m already your rss reader now and i would regularly watch out for the new posts, once again hats off to you! Thanx a million once again.


    on September 1 2018

    I just wanted to develop a small comment in order to say thanks to you for some of the splendid tips and tricks you are giving at this site. My rather long internet investigation has at the end of the day been paid with reliable facts and techniques to exchange with my close friends. I would tell you that we website visitors actually are really endowed to dwell in a useful site with many perfect individuals with very helpful things. I feel truly happy to have encountered the website page and look forward to plenty of more excellent moments reading here. Thank you again for everything.


    on September 1 2018

    hello there and thanks to your info ?I have certainly picked up anything new from right here. I did alternatively expertise a few technical points the use of this web site, since I skilled to reload the web site many times prior to I may get it to load correctly. I had been pondering if your web host is OK? Now not that I am complaining, but slow loading instances instances will sometimes have an effect on your placement in google and can harm your high-quality score if ads and ***********|advertising|advertising|advertising and *********** with Adwords. Anyway I including this RSS to my email and can glance out for much more of your respective intriguing content. Ensure that you update this again soon..

  9. https://creditorapido.credito-prestamos.es/

    on February 16 2019

    Referencias obtenidas en Aracat Credito Real ®.

  10. service plumbing

    on April 4 2019

    water bill

    Installation and Configuration of AWStats on Apache Web Server | Free Linux Tutorials

  11. hbo365

    on June 26 2019

    I am actually happy to glance at this weblog
    posts which includes tons of helpful data, thanks for
    providing these kinds of information.

  12. русский вулкан онлайн

    on July 4 2019

    This post iѕ actuаlly a nice one it assists new internet viewers,
    whoo are wishing іn favor of blogging.

  13. https://lioastanda.vn

    on July 4 2019

    Hi, juѕt wanteɗ t᧐ mention, I enjoyed tһis article.
    It wаѕ practical. Қeep on posting!

  14. agen situs judi online terpercaya

    on July 15 2019

    Thanks for finally talking about >Installation and Configuration of AWStats
    on Apache Web Server | Free Linux Tutorials <Liked it!


    on July 16 2019

    I go to see everyday a few web pages and information sites to read articles or reviews, but this blog provides quality based content.


  16. agen judi casino online terperccaya

    on July 17 2019

    This text is worth everyone’s attention. Where can I find out more?

  17. keyword 1

    on August 8 2019

    Ԝhat’s up to eѵery one, the contents present at this web site are
    truly remarkablе for people knowledge, well, keep up
    the good work feⅼlows.

  18. Builder’s registration

    on August 10 2019

    Hurrah, that’s what I was looking for, what a stuff!

    present here at this web site, thanks admin of this website.

  19. Melva

    on August 15 2019

    State e-file available throughout the program.

  20. Bandar Live Casino

    on August 16 2019

    Having read this I thought it was extremely enlightening.

    I appreciate you spending some time and effort to put this
    article together. I once again find myself spending a lot of time both reading and leaving comments.

    But so what, it was still worth it!

  21. Lorie

    on August 16 2019

    Hmm it looks like your website ate my first comment (it
    was super long) so I guess I’ll just sum it up what I had written and say,
    I’m thoroughly enjoying your blog. I too am an aspiring blog writer but I’m still new to the whole thing.
    Do you have any helpful hints for first-time blog writers?
    I’d certainly appreciate it.

  22. agen judi Casino

    on August 16 2019

    Hello, of course this post is truly pleasant and I have learned lot of
    things from it concerning blogging. thanks.

  23. livescore

    on August 17 2019

    A person neccessarily help to make severely articles I would
    state. This is the first time I frequented your website page and thus far?
    I amazed with the research you made to make this particular
    submit amazing. Wonderful process!

  24. sanyo-hananotera.com

    on August 18 2019

    Wonderful post but I was wanting to know if you could write a
    litte more on this subject? I’d be very thankful if you could elaborate a
    little bit further. Many thanks!

  25. New Zealand

    on August 18 2019

    New Zealand

    blog topic

  26. Judi Casino Terpercaya

    on August 19 2019

    May I simply just say what a relief to find a person that actually
    understands what they’re talking about on the web. You actually know
    how to bring a problem to light and make it important.

    More people should check this out and understand this side of your story.
    I was surprised you’re not more popular because you definitely have the gift.

  27. livescore Soccer

    on August 28 2019

    For newest information you have to pay a visit world-wide-web and oon internet I found this
    website as a most excellent web site for most recent updates.

  28. poesia

    on August 31 2019

    Kultur-Website zum Thema Lyrik und Schreiben mit kostenlosem Chat zum Teilen Ihrer

  29. royalbola303.net

    on September 1 2019

    Hi there very nice web site!! Guy .. Beautiful ..
    Amazing .. I will bookmark your site and take the feeds additionally?
    I am glad to seek out so many useful info here within the submit,
    we need work out extra strategies on this regard, thank you for
    sharing. . . . . .

  30. Du An Chung Cu Sunshine Diamond River

    on October 22 2019

    Du An Chung Cu Sunshine Diamond River

    blog topic

  31. site

    on October 25 2019

    WOW juѕt what I was searching for. Ϲame here bү searching for domino qq

  32. judi slot uang asli

    on October 26 2019

    OMG, the song remix is amazing….

  33. joker123 apk android

    on October 30 2019

    Nice respond in return of this issue with solid arguments and explaining
    all regarding that.

  34. https://ruunews.com

    on November 1 2019

    Excellent write-up. I definitely appreciate this website. Thanks!

  35. Regina

    on November 1 2019

    Wonderful goods from you, man. I’ve consider your stuff prior to and you’re simply extremely
    wonderful. I really like what you have obtained here, certainly like what you are
    stating and the way through which you are saying
    it. You are making it enjoyable and you still
    care for to stay it sensible. I can not wait
    to learn much more from you. This is actually a wonderful website.

  36. Marcos

    on November 2 2019

    Ở lượt trận cᥙối cùng tại bảng G khuôn khổ AFC
    Champions Leagսe năm nay, Jeonbuk sẽ chạm trán với Bᥙriram trên ѕân nhà.

  37. poker galaxy

    on November 4 2019

    The poker room had one of these $70 tournaments starting
    at Noon, 4 P. Just like anything else, I do believe that if you
    work hard enough at it, you have a chance at being successful.
    Become a true gambling mogul in the Casino City game with these helpful hints.
    If you’re a sociologist in the making, spending hours in a Vegas casino might turn out to be an interesting study.

  38. sumberjudi.wordpress.com

    on November 10 2019

    Great web site you have got here.. It’s hard to find good quality
    writing like yours these days. I really appreciate individuals like
    you! Take care!!

  39. Gary

    on December 9 2019

    I do not know whether it’s just me or if everyone else
    experiencing problems with your site. It appears like some of the written text in your content are running off the screen. Can somebody else please comment and let me know if this is happening to
    them too? This may be a problem with my internet browser because
    I’ve had this happen before. Kudos

  40. qqkini.asia

    on December 11 2019

    Thiss piece of writing gives clear idea for the new users of blogging,
    that actually howw to do blogging.

  41. Judi Slot Batman

    on January 5 2020

    It’s going to be end of mine day, however before end I am reading this fantastic paragraph to improve my know-how.

  42. гидра сайт открыть

    on January 8 2020

    Valuable information. Fortunate me I found your
    site unintentionally, and I’m stunned why this coincidence didn’t came about in advance!
    I bookmarked it.

  43. гидра форум

    on January 9 2020

    I don’t even know the way I finished up here, however I thought this post used to be good.
    I do not recognise who you’re however definitely you are going to a
    well-known blogger should you are not already. Cheers!

  44. моментальные покупки hydra

    on January 9 2020

    Hello great website! Does running a blog such as this require a great deal of work?

    I’ve virtually no understanding of programming but I was hoping to
    start my own blog in the near future. Anyway, should you have any
    recommendations or techniques for new blog owners please share.
    I know this is off subject but I just wanted to ask. Many thanks!

  45. gaybondaged.com

    on January 9 2020

    It’s actually very complicated in this active life to listen news on Television, therefore I simply use world wide web for that purpose,
    and obtain the most recent information.

  46. Dedra

    on January 27 2020

    Do you mind if I quote a few of your articles as long as I provide credit and sources back to your website?
    My website is in the very same niche as yours and my visitors
    would really benefit from some of the information you provide here.

    Please let me know if this alright with you. Appreciate it!

  47. www.hackster.io

    on February 3 2020

    Heya this is somewhat of off topic but I was wondering if blogs use WYSIWYG editors or if you have to manually code with HTML.
    I’m starting a blog soon but have no coding expertise so I wanted to get advice from someone with experience.

    Any help would be greatly appreciated!

  48. judi online artikel

    on February 18 2020

    Why users still use to read news papers when in this technological globe all is accessible on net?

  49. situs judi samgong online

    on February 29 2020

    Excellent site. Lots of useful information here.

    I’m sending it to some friends ans additionally sharing in delicious.
    And naturally, thank you on your sweat!

  50. link alternatif rajawaliqq

    on March 7 2020

    Hello, i believe that i saw you visited my web site so i got
    here to go back the choose?.I’m attempting to in finding things to enhance my website!I guess
    its good enough to make use of a few of your ideas!!

  51. Dirk

    on March 20 2020

    I’d liкe to thɑnk you for the efforts ʏoᥙ have put in writing this site.
    I really hope tօ check out the ѕame higһ-grade contеnt by
    you in thе future ɑs ѡell. Ӏn truth, yoսr creative writing abilities һas motivated me tߋ ɡet my own, personal website now 😉

  52. click through the following page

    on March 25 2020

    click through the following page

    blog topic

  53. Octavia

    on May 26 2020

    Do you have a spam problem on this blog; I also
    am a blogger, and I was wondering your situation; many of us have developed some nice practices and we are looking
    to exchange strategies with others, why not shoot me an e-mail if interested.

  54. Cecila

    on May 27 2020

    Great site you have got here.. It’s difficult to find good quality writing
    like yours nowadays. I seriously appreciate people like you!
    Take care!!

  55. Millie

    on May 29 2020

    Quality articles or reviews is the main to attract the
    visitors to pay a visit the website, that’s what this website
    is providing.

  56. redwap1.pro

    on June 8 2020

    There is definately a great deal to learn about this topic.
    I love all of the points you have made.

  57. nobar tv

    on October 16 2020

    make a nother page please,
    and dont forget ping page my site
    live streaming football and shcdule

  58. valuation services

    on October 17 2020

    Hey there! Quick question that’s totally off topic.
    Do you know how to make your site mobile friendly? My webzite lokks weird whe browsing frtom myy iphone4.
    I’m trying to find a theme or plugin that miight be able to fix
    this problem. If you have aany recommendations, please share.
    Appreciate it!

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.