Recently, I installed the RPMForge repo to setup “mod_fastcgi” on my Virtualmin server. In the “yum update” process, it inadvertently upgraded the AWStats package from the default Virtualmin package awstats-7.0-3.el6.noarch to Repoforge’s awstats-7.1-1.el6.rf.noarch. This caused the dreaded Error – Missing Headers in AWStats!
Running the “recheck configuration” in Virtualmin showed this error message:
“The AWstats command /usr/share/awstats/wwwroot/cgi-bin/awstats.pl was not found on your system.”
Searching further, it seems that Virtualmin do not recommend using 3rd party repositories as they can cause conflicts to existing packages, as in this case. I have 2 options – disable RepoForge’s repository, remove AWStats and then re-install AWStats from Virtualmin’s repo again. The risk with this method is that I might lose my existing traffic data.
So, the other more long winded method is to find out where does Virtualmin store the configuration for AWStats software and see if I can change the settings – fortunately, it is relatively easy to do so.
Goto Virtualmin –> System Settings –> Features and Plugins.
Click on the “Configure” link:
On the following page, you will see:
Change the following Path:
Full path to AWstats program: /var/www/awstats/awstats.pl
Full path to AWstats icons directory: /var/www/awstats/icons
Full path to AWstats lang directory: /var/www/awstats/
Full path to AWstats lib directory: /var/www/awstats/
Full path to AWstats plugin directory: /var/www/awstats.
Click “Save” and AWStats should be working fine again.
Here’s the final screenshot after the change.