-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmod_stats.conf
87 lines (74 loc) · 2.03 KB
/
mod_stats.conf
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# mod_stats.c configuration example
<IfModule mod_stats.c>
# These configuration directives are per directory.
<Directory /srv/ftp/pub/download>
# Statistics will be collected for this directory.
# It is the directory containing the "projects".
Stats On
# Ignore files which do not match this regexp.
StatsFileMask "\.(rpm|deb)$"
# Debugging should only be enabled on specific subdirectories for testing,
# because it is very extensive.
StatsDebug Off
# Hosts that are allowed to use ?cmd=... commands to add packages
# or delete them
StatsAdminHost 10.10.10.28
StatsAdminHost 2001:780:101:a00:204:23ff:fea6:9458
# required to enable ?cmd= commands
FormGET On
</Directory>
# SQL statements to be prepared
#
# This configuration is per server.
#
StatsDBDQuery "\
UPDATE redirect_stats \
SET count=count+1, \
counted_at=NOW() \
WHERE project=%s \
AND repository=%s \
AND arch=%s \
AND filename=%s \
AND filetype=%s \
AND version=%s \
AND `release`=%s"
StatsDBDSelectQuery "\
SELECT \
id \
FROM \
redirect_stats \
WHERE \
project=%s \
AND repository=%s \
AND arch=%s \
AND filename=%s \
AND filetype=%s \
AND version=%s \
AND `release`=%s"
StatsDBDDeleteQuery "\
DELETE \
FROM \
redirect_stats \
WHERE \
project=%s \
AND repository=%s \
AND arch=%s \
AND filename=%s \
AND filetype=%s \
AND version=%s \
AND `release`=%s"
StatsDBDInsertQuery "\
INSERT INTO \
redirect_stats \
SET \
project=%s, \
repository=%s, \
arch=%s, \
filename=%s, \
filetype=%s, \
version=%s, \
`release`=%s, \
counted_at=NOW(), \
package=%s"
</IfModule>
# vim: set ft=apache ts=4 sw=4 ai expandtab smarttab: