/usr/share/doc/libapache2-mod-log-sql/create_tables.sql is in libapache2-mod-log-sql 1.100-15.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | create table access_log (
id char(19) ,
agent varchar(255) ,
bytes_sent int unsigned ,
child_pid smallint unsigned,
cookie varchar(255),
machine_id varchar(25),
request_file varchar(255),
referer varchar(255) ,
remote_host varchar(50) ,
remote_logname varchar(50) ,
remote_user varchar(50) ,
request_duration smallint unsigned ,
request_line varchar(255),
request_method varchar(10) ,
request_protocol varchar(10) ,
request_time char(28),
request_uri varchar(255),
request_args varchar(255),
server_port smallint unsigned,
ssl_cipher varchar(25),
ssl_keysize smallint unsigned,
ssl_maxkeysize smallint unsigned,
status smallint unsigned ,
time_stamp int unsigned ,
virtual_host varchar(255)
);
create table notes (
id char(19),
item varchar(80),
val varchar(80)
);
create table headers_in (
id char(19),
item varchar(80),
val varchar(80)
);
create table headers_out (
id char(19),
item varchar(80),
val varchar(80)
);
create table cookies (
id char(19),
item varchar(80),
val varchar(80)
);
# Added by Thomas Goirand (Debian maintainer and score_board patch upstream)
# take care that the UNIQUE KEY is really VITAL of you don't want your server
# to die with a huge MySQL load...
create table score_board (
id int(14) NOT NULL auto_increment,
vhost varchar(50) NOT NULL default '',
bytes_sent bigint(14) unsigned NOT NULL default '0',
bytes_receive bigint(14) unsigned NOT NULL default '0',
count_hosts int(12) NOT NULL default '0',
count_visits int(12) NOT NULL default '0',
count_status_200 int(12) NOT NULL default '0',
count_status_404 int(12) NOT NULL default '0',
count_impressions int(18) NOT NULL default '0',
last_run int(14) NOT NULL default '0',
month int(4) NOT NULL default '0',
year int(4) NOT NULL default '0',
domain varchar(50) NOT NULL default '',
PRIMARY KEY (id),
UNIQUE KEY `vhost` (`vhost`,`month`,`year`,`domain`)
) TYPE=MyISAM;
|