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.

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 /home/saad/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride AuthConfig
        Order allow,deny
        allow from all

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

    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 ::1/128


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

HostAliases="localhost 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.


Turns out you have to edit the awstats.conf file in addition to the awstats.server-name.no-ip.org file to get it to work. The wiki instructions were to only edit the self created conf file. Once I edited the awstats.conf itself, it started working.

| improve this question | | | | |
  • 1
    Please post your solution as an answer and accept it, so the question is marked as solved. – Gerald Schneider Jan 25 '17 at 12:42

Setup ('/etc/awstats/awstats.conf' file, web server or permissions) may be wrong.

Looks like the awstats cgi-script can't read the configfile. Make sure the webserver-user (typically www-data) can read this file.

| improve this answer | | | | |
  • 2
    -rw-r--r-- 1 root root 61759 Nov 12 11:53 awstats.server-name.noip.org.conf As you can see everybody can read the file. – koogee Nov 12 '13 at 15:35
  • changed its permissions to 777 just in case. still not working. – koogee Nov 12 '13 at 15:58
  • 2
    @koogee Don't use chmod 777. – gf_ May 7 '16 at 10:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.