Problems with AWStats

I installed Virtualmin using the install script a few months ago and I just got my server upgraded from Centos 5.4 to Centos 5.5. The problem I am having might be that my server was using a non-genuine CentOS install and a simple yum upgrade wouldn’t do the trick, so my server management had to go in and upgrade it for me. However, after upgrading it looks like AWStats has completely changed and no longer works as it used to.

When accessing the stats through Virtualmin, the URL is of the form:

I get the error:

Error - Missing Headers

My /var/webmin/miniserv.error file contains the following errors at the end:

[21/Aug/2010:18:30:55 -0600] [my_IP] /virtualmin-awstats/view.cgi : Missing Headers

Also, opening the ~/public_html/cgi-bin/ file, it contains:

#!/bin/sh exec /usr/share/awstats/wwwroot/cgi-bin/

However, the /usr/share/awstats directory does not even exist anymore.

Doing a ‘locate’ shows the following files:

/etc/webmin/virtualmin-awstats/ /home/user1/public_html/cgi-bin/ /home/user2/public_html/cgi-bin/ /usr/libexec/webmin/virtualmin-awstats/ /usr/libexec/webmin/virtualmin-awstats/ /var/www/awstats/

I have updated the cgi-bin/ file in one of the domains to exec /var/www/awstats/ and it works when accessing through the domain’s cgi-bin, however it still does not work through Virtualmin.

Also, these are the installed awstats packages:

# rpm -qa | grep awstats wbm-virtualmin-awstats-4.4-1 awstats-6.95-1.el5.rf

Any idea what’s going on here?

I was able to get everything working through Virtualmin by updating “System Settings -> Features and Plugins -> Awstats -> Configure”. I had to change:

Full path to AWstats program to /var/www/awstats/
Full path to AWstats icons directory to /var/www/awstats/icon
Full path to AWstats lang directory to /var/www/awstats/lang
Full path to AWstats lib directory to /var/www/awstats/lib
Full path to AWstats plugins directory to /var/www/awstats/plugins

It just seems weird to me that all the paths would change after an update.

Thanks for sharing. I had the same problem and it is solved now.

Thanks for the awstats paths. I just decided to enable awstats after all this time but I couldn’t see my awstats icons so I found this post and now I realize that perhaps some other things were wrong as well. So thank you =)