I did a quick but working fix: I manually compiled mod_auth_mysql from source, there are some pretty good explanations in the web. One would be:
Code:
wget http://heanet.dl.sourceforge.net/sourceforge/modauthmysql/mod_auth_mysql-3.0.0.tar.gz
wget http://www.bleb.org/software/mod_auth_mysql-3.0.0-apache-2.2.3.patch
tar zxf mod_auth_mysql-3.0.0.tar.gz
apt-get install apache2-prefork-dev libmysqlclient15-dev
cd mod_auth_mysql-3.0.0
patch < ../mod_auth_mysql-3.0.0-apache-2.2.3.patch
sed -i 's|#include <mysql.h>|#include <mysql/mysql.h>|' mod_auth_mysql.c
apxs2 -c -lmysqlclient -lm -lz mod_auth_mysql.c
apxs2 -i mod_auth_mysql.la
echo 'LoadModule mysql_auth_module /usr/lib/apache2/modules/mod_auth_mysql.so' >/etc/apache2/mods-available/auth_mysql.load
a2enmod auth_mysql
apache2ctl graceful
Next step would be activating the protection in /etc/apache2/sites-available/01_awstats.conf like this:
Code:
<Directory /usr/lib/cgi-bin>
[..]
AuthName "AWStats Login"
AuthType Basic
AuthMYSQLEnable on
AuthMySQLAuthoritative on
AuthMySQLHost localhost
AuthMySQLUser <sql-user with access to DB ispcp>
AuthMySQLPassword <password of mysql-user>
AuthMySQLDB ispcp
AuthMySQLUserTable admin
AuthMySQLNameField admin_name
AuthMySQLPasswordField admin_pass
AuthMySQLNoPasswd off
AuthMySQLPwEncryption PHP_MD5
</Directory>
This is only a quick fix so the stats are password protected. Customers of the server can still log in to all stats hosted there, but still pretty much better than without any authentication.