...ho aggiunto un modulo ad apache :
Codice:
libapache2-mod-log-sql-mysql
...creato il db e aggiunto i privilegi...
Codice:
create database apachelogs;
grant insert,create on apachelogs.* to loguser@localhost identified by 'loguser_password';
grant insert,create on apachelogs.* to loguser@localhost.localdomain identified by 'loguser_password';
FLUSH PRIVILEGES;
...e modificato il file /etc/apache2/sites-available/default ...
Codice:
LogSQLLoginInfo mysql://loguser:loguser_password@localhost/apachelogs
LogSQLCreateTables on
LogSQLDBParam socketfile /var/run/mysqld/mysqld.sock
LogSQLTransferLogFormat AbHhmRSsTUuvI
NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/web1/web/
<Directory /var/www/web1/web/>
Options Indexes MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
LogSQLTransferLogTable web1_access_log
</VirtualHost>
...done...