Elmo's picture

Does anyone have any pointers on how to set up AWstats correctly on Turnkey LAMP?

 

I have tried following various guides but can never complete the config of AWStats.

Forum: 
Jeremy Davis's picture

But if you note that TKL v11.0RC is based on Ubuntu Lucid/10.04 you may have more luck?

I'm assuming that you got it installed ok (seeing as you said config was the issue) but for completeness:

apt-get update && apt-get install awstats
A quick google turned up a couple of links that look potentially useful:

The second one is quite out of date but should be at least still marginally useful (it has much more detail than the first). If that's still no good to you, perhaps you could explain exactly what steps aren't working, with details of errors etc.

Elmo's picture

Hi,

 

Thanks for replying.  The LAMP is set up to provide hosting for multiple domains. AWStats loads great when browsing to "domain.com/statistics/awstats.pl?config=domain.com"

 

The problem is that the access.log file is 0 bytes.  How can I get apache to record data to this file?

Richard Steiner's picture

Configuring awstats is easy.  Configuring Apache on the LAMP appliance is sometimes not as easy as I would hope for.  :-)

I don't need the stats, but it would be nice...

-Rich Steiner >>>---> Mableton, GA USA >>>---> The Theorem Theorem: If If, Then Then.

Richard Steiner's picture

I went into /etc/apache2/apache2.conf and changed the following section:

#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
# If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

by adding the following three lines:

CustomLog logs/access_log combined
CustomLog logs/referer_log "%{Referer}i -> %U"
CustomLog logs/agent_log "%{User-agent}i"

I also created a logs subdirectory under /etc/apache, and the Apache server helpfully created the required log files in that location.

To point awstats to the access_log file, to into your awstats.????.conf and make sure the following directive exists:

LogFile="/etc/apache2/logs/access_log"

I think I also ended up setting LogFormat=1 lower down.

Just in case someone finds it useful...

-Rich Steiner >>>---> Mableton, GA USA >>>---> The Theorem Theorem: If If, Then Then.

Jeremy Davis's picture

I'm sure others will find this of interest.

Add new comment