Getting AWStats to work in Ubuntu 12.04

Posted by koogee on Server Fault See other posts from Server Fault or by koogee
Published on 2013-11-12T11:00:58Z Indexed on 2013/11/12 15:54 UTC
Read the original article Hit count: 600

Filed under:
|
|

I'm new to apache and i'm trying to set up AWStats on my ubuntu 12.04 server. I've followed the guide at Ubuntu docs https://help.ubuntu.com/community/AWStats

I set it up according to the instructions and awstats is able to generate initial stats from apache log successfully. I placed the links to awstats in the default virtual host file. However when I try to run http://server-ip-address:8080/awstats/awstats.pl, I get:

Error: SiteDomain parameter not defined in your config/domain file. You must edit it for using this version of AWStats. 

Setup ('/etc/awstats/awstats.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

Here is my /etc/apache2/sites-available/default file:

<VirtualHost *:8080>
    ServerAdmin webmaster@localhost

    DocumentRoot /home/saad/www
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /home/saad/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride AuthConfig
        Order allow,deny
        allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>

    Alias /awstatsclasses "/usr/share/awstats/lib/"
    Alias /awstats-icon "/usr/share/awstats/icon/"
    Alias /awstatscss "/usr/share/doc/awstats/examples/css"
    ScriptAlias /awstats/ /usr/lib/cgi-bin/
    Options ExecCGI -MultiViews +SymLinksIfOwnerMatch

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

The only three variables I edited in /etc/awstats/awstats.conf are:

LogFile="/var/log/apache2/access.log" 
SiteDomain="server-name.noip.org"
HostAliases="localhost 127.0.0.1 server-name.no-ip.org"

The apache server works fine and i'm able to access other pages stored on the server. Any guidance would be welcome.

© Server Fault or respective owner

Related posts about apache2

Related posts about ubuntu-12.04