summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/contents.pngbin0 -> 278 bytes
-rw-r--r--docs/crossref.pngbin0 -> 147 bytes
-rw-r--r--docs/documentation.css33
-rw-r--r--docs/documentation.html269
-rw-r--r--docs/img1.pngbin0 -> 154 bytes
-rw-r--r--docs/img2.pngbin0 -> 214 bytes
-rw-r--r--docs/img3.pngbin0 -> 318 bytes
-rw-r--r--docs/img4.pngbin0 -> 564 bytes
-rw-r--r--docs/index.html269
-rw-r--r--docs/next.pngbin0 -> 245 bytes
-rw-r--r--docs/next_g.pngbin0 -> 272 bytes
-rw-r--r--docs/node1.html128
-rw-r--r--docs/node2.html276
-rw-r--r--docs/node3.html664
-rw-r--r--docs/node4.html2014
-rw-r--r--docs/node5.html1270
-rw-r--r--docs/node6.html74
-rw-r--r--docs/prev.pngbin0 -> 279 bytes
-rw-r--r--docs/prev_g.pngbin0 -> 327 bytes
-rw-r--r--docs/style_1.css33
-rw-r--r--docs/up.pngbin0 -> 211 bytes
-rw-r--r--docs/up_g.pngbin0 -> 231 bytes
22 files changed, 5030 insertions, 0 deletions
diff --git a/docs/contents.png b/docs/contents.png
new file mode 100644
index 0000000..0c752c6
--- /dev/null
+++ b/docs/contents.png
Binary files differ
diff --git a/docs/crossref.png b/docs/crossref.png
new file mode 100644
index 0000000..7dd2ddd
--- /dev/null
+++ b/docs/crossref.png
Binary files differ
diff --git a/docs/documentation.css b/docs/documentation.css
new file mode 100644
index 0000000..f12a3af
--- /dev/null
+++ b/docs/documentation.css
@@ -0,0 +1,33 @@
1body {
2 margin-left: 3%;
3 background-color: #ccccFF;
4 font-family: sans-serif;
5}
6
7h1 {
8 text-align: center;
9}
10
11h2 {
12 margin-left: -1%;
13 font-size: 150%;
14}
15
16h3 {
17 margin-left: -1%;
18}
19
20h4 {
21 text-align: center;
22}
23
24p {
25}
26
27pre {
28 font-family: monospace;
29}
30
31DD {
32 font-family: monospace;
33} \ No newline at end of file
diff --git a/docs/documentation.html b/docs/documentation.html
new file mode 100644
index 0000000..d63b31f
--- /dev/null
+++ b/docs/documentation.html
@@ -0,0 +1,269 @@
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2
3<!--Converted with LaTeX2HTML 2002-1 (1.68)
4original version by: Nikos Drakos, CBLU, University of Leeds
5* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
6* with significant contributions from:
7 Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
8<HTML>
9<HEAD>
10<TITLE>Installing and Running mod_log_sql</TITLE>
11<META NAME="description" CONTENT="Installing and Running mod_log_sql">
12<META NAME="keywords" CONTENT="documentation">
13<META NAME="resource-type" CONTENT="document">
14<META NAME="distribution" CONTENT="global">
15
16<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
17<META NAME="Generator" CONTENT="LaTeX2HTML v2002-1">
18<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
19
20<LINK REL="STYLESHEET" HREF="documentation.css">
21
22<LINK REL="next" HREF="node1.html">
23</HEAD>
24
25<BODY >
26<!--Navigation Panel-->
27<A NAME="tex2html6"
28 HREF="node1.html">
29<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
30<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_g.png">
31<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev_g.png">
32<A NAME="tex2html4"
33 HREF="node1.html">
34<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
35<BR>
36<B> Next:</B> <A NAME="tex2html7"
37 HREF="node1.html">Contents</A>
38 &nbsp; <B> <A NAME="tex2html5"
39 HREF="node1.html">Contents</A></B>
40<BR>
41<BR>
42<!--End of Navigation Panel-->
43
44<P>
45
46
47
48
49<P>
50
51<P>
52<H1 ALIGN="CENTER">Installing and Running mod_log_sql</H1>
53<P ALIGN="CENTER"><STRONG>Christopher Powell, &lt;chris@grubbybaby.com&gt; </STRONG></P>
54<BR><HR>
55<!--Table of Child-Links-->
56<A NAME="CHILD_LINKS"></A>
57
58<UL>
59<LI><A NAME="tex2html8"
60 HREF="node1.html">Contents</A>
61<LI><A NAME="tex2html9"
62 HREF="node2.html">1 Introduction</A>
63<UL>
64<LI><A NAME="tex2html10"
65 HREF="node2.html#SECTION00021000000000000000">1.1 Homepage </A>
66<LI><A NAME="tex2html11"
67 HREF="node2.html#SECTION00022000000000000000">1.2 Summary</A>
68<LI><A NAME="tex2html12"
69 HREF="node2.html#SECTION00023000000000000000">1.3 Approach</A>
70<LI><A NAME="tex2html13"
71 HREF="node2.html#SECTION00024000000000000000">1.4 What gets logged by default? </A>
72<LI><A NAME="tex2html14"
73 HREF="node2.html#SECTION00025000000000000000">1.5 Miscellaneous Notes</A>
74<LI><A NAME="tex2html15"
75 HREF="node2.html#SECTION00026000000000000000">1.6 Author / Maintainer</A>
76</UL>
77<BR>
78<LI><A NAME="tex2html16"
79 HREF="node3.html">2 Installation</A>
80<UL>
81<LI><A NAME="tex2html17"
82 HREF="node3.html#SECTION00031000000000000000">2.1 Requirements</A>
83<LI><A NAME="tex2html18"
84 HREF="node3.html#SECTION00032000000000000000">2.2 Platform-specific notes</A>
85<UL>
86<LI><A NAME="tex2html19"
87 HREF="node3.html#SECTION00032100000000000000">2.2.1 Solaris</A>
88<LI><A NAME="tex2html20"
89 HREF="node3.html#SECTION00032200000000000000">2.2.2 BSD</A>
90<LI><A NAME="tex2html21"
91 HREF="node3.html#SECTION00032300000000000000">2.2.3 Win32</A>
92</UL>
93<LI><A NAME="tex2html22"
94 HREF="node3.html#SECTION00033000000000000000">2.3 Do I want a DSO or a static module?</A>
95<LI><A NAME="tex2html23"
96 HREF="node3.html#SECTION00034000000000000000">2.4 Installation as an Apache DSO (Preferred) </A>
97<LI><A NAME="tex2html24"
98 HREF="node3.html#SECTION00035000000000000000">2.5 Installation as a static module compiled into
99httpd</A>
100</UL>
101<BR>
102<LI><A NAME="tex2html25"
103 HREF="node4.html">3 Configuration</A>
104<UL>
105<LI><A NAME="tex2html26"
106 HREF="node4.html#SECTION00041000000000000000">3.1 Preparing MySQL for logging</A>
107<LI><A NAME="tex2html27"
108 HREF="node4.html#SECTION00042000000000000000">3.2 A very basic logging setup in Apache</A>
109<LI><A NAME="tex2html28"
110 HREF="node4.html#SECTION00043000000000000000">3.3 Testing the basic setup</A>
111<LI><A NAME="tex2html29"
112 HREF="node4.html#SECTION00044000000000000000">3.4 How to tune logging with run-time directives</A>
113<UL>
114<LI><A NAME="tex2html30"
115 HREF="node4.html#SECTION00044100000000000000">3.4.1 Instructing the module what to log</A>
116<LI><A NAME="tex2html31"
117 HREF="node4.html#SECTION00044200000000000000">3.4.2 Instructing the module what NOT to log using filtering
118directives</A>
119</UL>
120<LI><A NAME="tex2html32"
121 HREF="node4.html#SECTION00045000000000000000">3.5 Advanced logging scenarios</A>
122<UL>
123<LI><A NAME="tex2html33"
124 HREF="node4.html#SECTION00045100000000000000">3.5.1 Using the module in an ISP environment</A>
125<LI><A NAME="tex2html34"
126 HREF="node4.html#SECTION00045200000000000000">3.5.2 Logging many-to-one data in separate tables</A>
127<LI><A NAME="tex2html35"
128 HREF="node4.html#SECTION00045300000000000000">3.5.3 Using the same database for production and test</A>
129<LI><A NAME="tex2html36"
130 HREF="node4.html#SECTION00045400000000000000">3.5.4 Optimizing for a busy database</A>
131</UL>
132<LI><A NAME="tex2html37"
133 HREF="node4.html#SECTION00046000000000000000">3.6 Configuration directive reference</A>
134<UL>
135<LI><A NAME="tex2html38"
136 HREF="node4.html#SECTION00046100000000000000">3.6.1 LogSQLCookieLogTable</A>
137<LI><A NAME="tex2html39"
138 HREF="node4.html#SECTION00046200000000000000">3.6.2 LogSQLCreateTables</A>
139<LI><A NAME="tex2html40"
140 HREF="node4.html#SECTION00046300000000000000">3.6.3 LogSQLDatabase </A>
141<LI><A NAME="tex2html41"
142 HREF="node4.html#SECTION00046400000000000000">3.6.4 LogSQLForcePreserve</A>
143<LI><A NAME="tex2html42"
144 HREF="node4.html#SECTION00046500000000000000">3.6.5 LogSQLHeadersInLogTable</A>
145<LI><A NAME="tex2html43"
146 HREF="node4.html#SECTION00046600000000000000">3.6.6 LogSQLHeadersOutLogTable</A>
147<LI><A NAME="tex2html44"
148 HREF="node4.html#SECTION00046700000000000000">3.6.7 LogSQLLoginInfo </A>
149<LI><A NAME="tex2html45"
150 HREF="node4.html#SECTION00046800000000000000">3.6.8 LogSQLMachineID</A>
151<LI><A NAME="tex2html46"
152 HREF="node4.html#SECTION00046900000000000000">3.6.9 LogSQLMassVirtualHosting</A>
153<LI><A NAME="tex2html47"
154 HREF="node4.html#SECTION000461000000000000000">3.6.10 LogSQLNotesLogTable</A>
155<LI><A NAME="tex2html48"
156 HREF="node4.html#SECTION000461100000000000000">3.6.11 LogSQLPreserveFile</A>
157<LI><A NAME="tex2html49"
158 HREF="node4.html#SECTION000461200000000000000">3.6.12 LogSQLRemhostIgnore</A>
159<LI><A NAME="tex2html50"
160 HREF="node4.html#SECTION000461300000000000000">3.6.13 LogSQLRequestAccept</A>
161<LI><A NAME="tex2html51"
162 HREF="node4.html#SECTION000461400000000000000">3.6.14 LogSQLRequestIgnore</A>
163<LI><A NAME="tex2html52"
164 HREF="node4.html#SECTION000461500000000000000">3.6.15 LogSQLSocketFile </A>
165<LI><A NAME="tex2html53"
166 HREF="node4.html#SECTION000461600000000000000">3.6.16 LogSQLTCPPort</A>
167<LI><A NAME="tex2html54"
168 HREF="node4.html#SECTION000461700000000000000">3.6.17 LogSQLTransferLogFormat </A>
169<LI><A NAME="tex2html55"
170 HREF="node4.html#SECTION000461800000000000000">3.6.18 LogSQLTransferLogTable</A>
171<LI><A NAME="tex2html56"
172 HREF="node4.html#SECTION000461900000000000000">3.6.19 LogSQLWhichCookie</A>
173<LI><A NAME="tex2html57"
174 HREF="node4.html#SECTION000462000000000000000">3.6.20 LogSQLWhichCookies</A>
175<LI><A NAME="tex2html58"
176 HREF="node4.html#SECTION000462100000000000000">3.6.21 LogSQLWhichHeadersIn</A>
177<LI><A NAME="tex2html59"
178 HREF="node4.html#SECTION000462200000000000000">3.6.22 LogSQLWhichHeadersOut</A>
179<LI><A NAME="tex2html60"
180 HREF="node4.html#SECTION000462300000000000000">3.6.23 LogSQLWhichNotes</A>
181</UL>
182</UL>
183<BR>
184<LI><A NAME="tex2html61"
185 HREF="node5.html">4 FAQ</A>
186<UL>
187<LI><A NAME="tex2html62"
188 HREF="node5.html#SECTION00051000000000000000">4.1 General module questions</A>
189<UL>
190<LI><A NAME="tex2html63"
191 HREF="node5.html#SECTION00051100000000000000">4.1.1 Why log to an SQL database?</A>
192<LI><A NAME="tex2html64"
193 HREF="node5.html#SECTION00051200000000000000">4.1.2 Why use MySQL? Are there alternatives?</A>
194<LI><A NAME="tex2html65"
195 HREF="node5.html#SECTION00051300000000000000">4.1.3 Is this code production-ready?</A>
196<LI><A NAME="tex2html66"
197 HREF="node5.html#SECTION00051400000000000000">4.1.4 Who's using mod_log_sql?</A>
198<LI><A NAME="tex2html67"
199 HREF="node5.html#SECTION00051500000000000000">4.1.5 Why doesn't the module also replace the Apache ErrorLog?</A>
200<LI><A NAME="tex2html68"
201 HREF="node5.html#SECTION00051600000000000000">4.1.6 Does mod_log_sql work with Apache 2.x?</A>
202<LI><A NAME="tex2html69"
203 HREF="node5.html#SECTION00051700000000000000">4.1.7 Does mod_log_sql connect to MySQL via TCP/IP or a socket?</A>
204<LI><A NAME="tex2html70"
205 HREF="node5.html#SECTION00051800000000000000">4.1.8 I have discovered a bug. Who can I contact?</A>
206</UL>
207<LI><A NAME="tex2html71"
208 HREF="node5.html#SECTION00052000000000000000">4.2 Problems</A>
209<UL>
210<LI><A NAME="tex2html72"
211 HREF="node5.html#SECTION00052100000000000000">4.2.1 Apache segfaults when using PHP and mod_log_sql</A>
212<LI><A NAME="tex2html73"
213 HREF="node5.html#SECTION00052200000000000000">4.2.2 Apache appears to start up fine, but nothing
214is getting logged in the database</A>
215<LI><A NAME="tex2html74"
216 HREF="node5.html#SECTION00052300000000000000">4.2.3 Why do I get the message ``insufficient configuration info to
217establish database link'' in my Apache error log?</A>
218<LI><A NAME="tex2html75"
219 HREF="node5.html#SECTION00052400000000000000">4.2.4 My database cannot handle all the open connections from mod_log_sql,
220is there anything I can do?</A>
221<LI><A NAME="tex2html76"
222 HREF="node5.html#SECTION00052500000000000000">4.2.5 Why do I occasionally see a ``lost connection to MySQL server''
223message in my Apache error log?</A>
224</UL>
225<LI><A NAME="tex2html77"
226 HREF="node5.html#SECTION00053000000000000000">4.3 Performance and Tuning</A>
227<UL>
228<LI><A NAME="tex2html78"
229 HREF="node5.html#SECTION00053100000000000000">4.3.1 How well does it perform?</A>
230<LI><A NAME="tex2html79"
231 HREF="node5.html#SECTION00053200000000000000">4.3.2 Do I need to be worried about all the running MySQL children? Will
232holding open <I>n</I> Apache-to-MySQL connections consume a lot of
233memory? </A>
234<LI><A NAME="tex2html80"
235 HREF="node5.html#SECTION00053300000000000000">4.3.3 My webserver cannot handle all the traffic that my site receives,
236is there anything I can do?</A>
237<LI><A NAME="tex2html81"
238 HREF="node5.html#SECTION00053400000000000000">4.3.4 What is the issue with activating delayed
239inserts?</A>
240</UL>
241<LI><A NAME="tex2html82"
242 HREF="node5.html#SECTION00054000000000000000">4.4 ``How do I...?'' - accomplishing certain tasks</A>
243<UL>
244<LI><A NAME="tex2html83"
245 HREF="node5.html#SECTION00054100000000000000">4.4.1 I am using LogSQLMassVirtualHosting, and sometimes a single VirtualHost
246gets logged to two different tables. How do I prevent that?</A>
247<LI><A NAME="tex2html84"
248 HREF="node5.html#SECTION00054200000000000000">4.4.2 How do I extract the data in a format that my analysis tool can understand?</A>
249<LI><A NAME="tex2html85"
250 HREF="node5.html#SECTION00054300000000000000">4.4.3 How can I log mod_usertrack cookies?</A>
251<LI><A NAME="tex2html86"
252 HREF="node5.html#SECTION00054400000000000000">4.4.4 What if I want to log more than one cookie? What is the difference
253between LogSQLWhichCookie and LogSQLWhichCookies?</A>
254<LI><A NAME="tex2html87"
255 HREF="node5.html#SECTION00054500000000000000">4.4.5 What are the SSL logging features, and how do I activate them?</A>
256</UL>
257</UL>
258<BR>
259<LI><A NAME="tex2html88"
260 HREF="node6.html">About this document ...</A>
261</UL>
262<!--End of Table of Child-Links-->
263<BR><HR>
264<ADDRESS>
265Chris Powell
2662002-12-18
267</ADDRESS>
268</BODY>
269</HTML>
diff --git a/docs/img1.png b/docs/img1.png
new file mode 100644
index 0000000..d34217e
--- /dev/null
+++ b/docs/img1.png
Binary files differ
diff --git a/docs/img2.png b/docs/img2.png
new file mode 100644
index 0000000..df51a7c
--- /dev/null
+++ b/docs/img2.png
Binary files differ
diff --git a/docs/img3.png b/docs/img3.png
new file mode 100644
index 0000000..1cd68cf
--- /dev/null
+++ b/docs/img3.png
Binary files differ
diff --git a/docs/img4.png b/docs/img4.png
new file mode 100644
index 0000000..1e2543f
--- /dev/null
+++ b/docs/img4.png
Binary files differ
diff --git a/docs/index.html b/docs/index.html
new file mode 100644
index 0000000..d63b31f
--- /dev/null
+++ b/docs/index.html
@@ -0,0 +1,269 @@
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2
3<!--Converted with LaTeX2HTML 2002-1 (1.68)
4original version by: Nikos Drakos, CBLU, University of Leeds
5* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
6* with significant contributions from:
7 Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
8<HTML>
9<HEAD>
10<TITLE>Installing and Running mod_log_sql</TITLE>
11<META NAME="description" CONTENT="Installing and Running mod_log_sql">
12<META NAME="keywords" CONTENT="documentation">
13<META NAME="resource-type" CONTENT="document">
14<META NAME="distribution" CONTENT="global">
15
16<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
17<META NAME="Generator" CONTENT="LaTeX2HTML v2002-1">
18<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
19
20<LINK REL="STYLESHEET" HREF="documentation.css">
21
22<LINK REL="next" HREF="node1.html">
23</HEAD>
24
25<BODY >
26<!--Navigation Panel-->
27<A NAME="tex2html6"
28 HREF="node1.html">
29<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
30<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_g.png">
31<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev_g.png">
32<A NAME="tex2html4"
33 HREF="node1.html">
34<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
35<BR>
36<B> Next:</B> <A NAME="tex2html7"
37 HREF="node1.html">Contents</A>
38 &nbsp; <B> <A NAME="tex2html5"
39 HREF="node1.html">Contents</A></B>
40<BR>
41<BR>
42<!--End of Navigation Panel-->
43
44<P>
45
46
47
48
49<P>
50
51<P>
52<H1 ALIGN="CENTER">Installing and Running mod_log_sql</H1>
53<P ALIGN="CENTER"><STRONG>Christopher Powell, &lt;chris@grubbybaby.com&gt; </STRONG></P>
54<BR><HR>
55<!--Table of Child-Links-->
56<A NAME="CHILD_LINKS"></A>
57
58<UL>
59<LI><A NAME="tex2html8"
60 HREF="node1.html">Contents</A>
61<LI><A NAME="tex2html9"
62 HREF="node2.html">1 Introduction</A>
63<UL>
64<LI><A NAME="tex2html10"
65 HREF="node2.html#SECTION00021000000000000000">1.1 Homepage </A>
66<LI><A NAME="tex2html11"
67 HREF="node2.html#SECTION00022000000000000000">1.2 Summary</A>
68<LI><A NAME="tex2html12"
69 HREF="node2.html#SECTION00023000000000000000">1.3 Approach</A>
70<LI><A NAME="tex2html13"
71 HREF="node2.html#SECTION00024000000000000000">1.4 What gets logged by default? </A>
72<LI><A NAME="tex2html14"
73 HREF="node2.html#SECTION00025000000000000000">1.5 Miscellaneous Notes</A>
74<LI><A NAME="tex2html15"
75 HREF="node2.html#SECTION00026000000000000000">1.6 Author / Maintainer</A>
76</UL>
77<BR>
78<LI><A NAME="tex2html16"
79 HREF="node3.html">2 Installation</A>
80<UL>
81<LI><A NAME="tex2html17"
82 HREF="node3.html#SECTION00031000000000000000">2.1 Requirements</A>
83<LI><A NAME="tex2html18"
84 HREF="node3.html#SECTION00032000000000000000">2.2 Platform-specific notes</A>
85<UL>
86<LI><A NAME="tex2html19"
87 HREF="node3.html#SECTION00032100000000000000">2.2.1 Solaris</A>
88<LI><A NAME="tex2html20"
89 HREF="node3.html#SECTION00032200000000000000">2.2.2 BSD</A>
90<LI><A NAME="tex2html21"
91 HREF="node3.html#SECTION00032300000000000000">2.2.3 Win32</A>
92</UL>
93<LI><A NAME="tex2html22"
94 HREF="node3.html#SECTION00033000000000000000">2.3 Do I want a DSO or a static module?</A>
95<LI><A NAME="tex2html23"
96 HREF="node3.html#SECTION00034000000000000000">2.4 Installation as an Apache DSO (Preferred) </A>
97<LI><A NAME="tex2html24"
98 HREF="node3.html#SECTION00035000000000000000">2.5 Installation as a static module compiled into
99httpd</A>
100</UL>
101<BR>
102<LI><A NAME="tex2html25"
103 HREF="node4.html">3 Configuration</A>
104<UL>
105<LI><A NAME="tex2html26"
106 HREF="node4.html#SECTION00041000000000000000">3.1 Preparing MySQL for logging</A>
107<LI><A NAME="tex2html27"
108 HREF="node4.html#SECTION00042000000000000000">3.2 A very basic logging setup in Apache</A>
109<LI><A NAME="tex2html28"
110 HREF="node4.html#SECTION00043000000000000000">3.3 Testing the basic setup</A>
111<LI><A NAME="tex2html29"
112 HREF="node4.html#SECTION00044000000000000000">3.4 How to tune logging with run-time directives</A>
113<UL>
114<LI><A NAME="tex2html30"
115 HREF="node4.html#SECTION00044100000000000000">3.4.1 Instructing the module what to log</A>
116<LI><A NAME="tex2html31"
117 HREF="node4.html#SECTION00044200000000000000">3.4.2 Instructing the module what NOT to log using filtering
118directives</A>
119</UL>
120<LI><A NAME="tex2html32"
121 HREF="node4.html#SECTION00045000000000000000">3.5 Advanced logging scenarios</A>
122<UL>
123<LI><A NAME="tex2html33"
124 HREF="node4.html#SECTION00045100000000000000">3.5.1 Using the module in an ISP environment</A>
125<LI><A NAME="tex2html34"
126 HREF="node4.html#SECTION00045200000000000000">3.5.2 Logging many-to-one data in separate tables</A>
127<LI><A NAME="tex2html35"
128 HREF="node4.html#SECTION00045300000000000000">3.5.3 Using the same database for production and test</A>
129<LI><A NAME="tex2html36"
130 HREF="node4.html#SECTION00045400000000000000">3.5.4 Optimizing for a busy database</A>
131</UL>
132<LI><A NAME="tex2html37"
133 HREF="node4.html#SECTION00046000000000000000">3.6 Configuration directive reference</A>
134<UL>
135<LI><A NAME="tex2html38"
136 HREF="node4.html#SECTION00046100000000000000">3.6.1 LogSQLCookieLogTable</A>
137<LI><A NAME="tex2html39"
138 HREF="node4.html#SECTION00046200000000000000">3.6.2 LogSQLCreateTables</A>
139<LI><A NAME="tex2html40"
140 HREF="node4.html#SECTION00046300000000000000">3.6.3 LogSQLDatabase </A>
141<LI><A NAME="tex2html41"
142 HREF="node4.html#SECTION00046400000000000000">3.6.4 LogSQLForcePreserve</A>
143<LI><A NAME="tex2html42"
144 HREF="node4.html#SECTION00046500000000000000">3.6.5 LogSQLHeadersInLogTable</A>
145<LI><A NAME="tex2html43"
146 HREF="node4.html#SECTION00046600000000000000">3.6.6 LogSQLHeadersOutLogTable</A>
147<LI><A NAME="tex2html44"
148 HREF="node4.html#SECTION00046700000000000000">3.6.7 LogSQLLoginInfo </A>
149<LI><A NAME="tex2html45"
150 HREF="node4.html#SECTION00046800000000000000">3.6.8 LogSQLMachineID</A>
151<LI><A NAME="tex2html46"
152 HREF="node4.html#SECTION00046900000000000000">3.6.9 LogSQLMassVirtualHosting</A>
153<LI><A NAME="tex2html47"
154 HREF="node4.html#SECTION000461000000000000000">3.6.10 LogSQLNotesLogTable</A>
155<LI><A NAME="tex2html48"
156 HREF="node4.html#SECTION000461100000000000000">3.6.11 LogSQLPreserveFile</A>
157<LI><A NAME="tex2html49"
158 HREF="node4.html#SECTION000461200000000000000">3.6.12 LogSQLRemhostIgnore</A>
159<LI><A NAME="tex2html50"
160 HREF="node4.html#SECTION000461300000000000000">3.6.13 LogSQLRequestAccept</A>
161<LI><A NAME="tex2html51"
162 HREF="node4.html#SECTION000461400000000000000">3.6.14 LogSQLRequestIgnore</A>
163<LI><A NAME="tex2html52"
164 HREF="node4.html#SECTION000461500000000000000">3.6.15 LogSQLSocketFile </A>
165<LI><A NAME="tex2html53"
166 HREF="node4.html#SECTION000461600000000000000">3.6.16 LogSQLTCPPort</A>
167<LI><A NAME="tex2html54"
168 HREF="node4.html#SECTION000461700000000000000">3.6.17 LogSQLTransferLogFormat </A>
169<LI><A NAME="tex2html55"
170 HREF="node4.html#SECTION000461800000000000000">3.6.18 LogSQLTransferLogTable</A>
171<LI><A NAME="tex2html56"
172 HREF="node4.html#SECTION000461900000000000000">3.6.19 LogSQLWhichCookie</A>
173<LI><A NAME="tex2html57"
174 HREF="node4.html#SECTION000462000000000000000">3.6.20 LogSQLWhichCookies</A>
175<LI><A NAME="tex2html58"
176 HREF="node4.html#SECTION000462100000000000000">3.6.21 LogSQLWhichHeadersIn</A>
177<LI><A NAME="tex2html59"
178 HREF="node4.html#SECTION000462200000000000000">3.6.22 LogSQLWhichHeadersOut</A>
179<LI><A NAME="tex2html60"
180 HREF="node4.html#SECTION000462300000000000000">3.6.23 LogSQLWhichNotes</A>
181</UL>
182</UL>
183<BR>
184<LI><A NAME="tex2html61"
185 HREF="node5.html">4 FAQ</A>
186<UL>
187<LI><A NAME="tex2html62"
188 HREF="node5.html#SECTION00051000000000000000">4.1 General module questions</A>
189<UL>
190<LI><A NAME="tex2html63"
191 HREF="node5.html#SECTION00051100000000000000">4.1.1 Why log to an SQL database?</A>
192<LI><A NAME="tex2html64"
193 HREF="node5.html#SECTION00051200000000000000">4.1.2 Why use MySQL? Are there alternatives?</A>
194<LI><A NAME="tex2html65"
195 HREF="node5.html#SECTION00051300000000000000">4.1.3 Is this code production-ready?</A>
196<LI><A NAME="tex2html66"
197 HREF="node5.html#SECTION00051400000000000000">4.1.4 Who's using mod_log_sql?</A>
198<LI><A NAME="tex2html67"
199 HREF="node5.html#SECTION00051500000000000000">4.1.5 Why doesn't the module also replace the Apache ErrorLog?</A>
200<LI><A NAME="tex2html68"
201 HREF="node5.html#SECTION00051600000000000000">4.1.6 Does mod_log_sql work with Apache 2.x?</A>
202<LI><A NAME="tex2html69"
203 HREF="node5.html#SECTION00051700000000000000">4.1.7 Does mod_log_sql connect to MySQL via TCP/IP or a socket?</A>
204<LI><A NAME="tex2html70"
205 HREF="node5.html#SECTION00051800000000000000">4.1.8 I have discovered a bug. Who can I contact?</A>
206</UL>
207<LI><A NAME="tex2html71"
208 HREF="node5.html#SECTION00052000000000000000">4.2 Problems</A>
209<UL>
210<LI><A NAME="tex2html72"
211 HREF="node5.html#SECTION00052100000000000000">4.2.1 Apache segfaults when using PHP and mod_log_sql</A>
212<LI><A NAME="tex2html73"
213 HREF="node5.html#SECTION00052200000000000000">4.2.2 Apache appears to start up fine, but nothing
214is getting logged in the database</A>
215<LI><A NAME="tex2html74"
216 HREF="node5.html#SECTION00052300000000000000">4.2.3 Why do I get the message ``insufficient configuration info to
217establish database link'' in my Apache error log?</A>
218<LI><A NAME="tex2html75"
219 HREF="node5.html#SECTION00052400000000000000">4.2.4 My database cannot handle all the open connections from mod_log_sql,
220is there anything I can do?</A>
221<LI><A NAME="tex2html76"
222 HREF="node5.html#SECTION00052500000000000000">4.2.5 Why do I occasionally see a ``lost connection to MySQL server''
223message in my Apache error log?</A>
224</UL>
225<LI><A NAME="tex2html77"
226 HREF="node5.html#SECTION00053000000000000000">4.3 Performance and Tuning</A>
227<UL>
228<LI><A NAME="tex2html78"
229 HREF="node5.html#SECTION00053100000000000000">4.3.1 How well does it perform?</A>
230<LI><A NAME="tex2html79"
231 HREF="node5.html#SECTION00053200000000000000">4.3.2 Do I need to be worried about all the running MySQL children? Will
232holding open <I>n</I> Apache-to-MySQL connections consume a lot of
233memory? </A>
234<LI><A NAME="tex2html80"
235 HREF="node5.html#SECTION00053300000000000000">4.3.3 My webserver cannot handle all the traffic that my site receives,
236is there anything I can do?</A>
237<LI><A NAME="tex2html81"
238 HREF="node5.html#SECTION00053400000000000000">4.3.4 What is the issue with activating delayed
239inserts?</A>
240</UL>
241<LI><A NAME="tex2html82"
242 HREF="node5.html#SECTION00054000000000000000">4.4 ``How do I...?'' - accomplishing certain tasks</A>
243<UL>
244<LI><A NAME="tex2html83"
245 HREF="node5.html#SECTION00054100000000000000">4.4.1 I am using LogSQLMassVirtualHosting, and sometimes a single VirtualHost
246gets logged to two different tables. How do I prevent that?</A>
247<LI><A NAME="tex2html84"
248 HREF="node5.html#SECTION00054200000000000000">4.4.2 How do I extract the data in a format that my analysis tool can understand?</A>
249<LI><A NAME="tex2html85"
250 HREF="node5.html#SECTION00054300000000000000">4.4.3 How can I log mod_usertrack cookies?</A>
251<LI><A NAME="tex2html86"
252 HREF="node5.html#SECTION00054400000000000000">4.4.4 What if I want to log more than one cookie? What is the difference
253between LogSQLWhichCookie and LogSQLWhichCookies?</A>
254<LI><A NAME="tex2html87"
255 HREF="node5.html#SECTION00054500000000000000">4.4.5 What are the SSL logging features, and how do I activate them?</A>
256</UL>
257</UL>
258<BR>
259<LI><A NAME="tex2html88"
260 HREF="node6.html">About this document ...</A>
261</UL>
262<!--End of Table of Child-Links-->
263<BR><HR>
264<ADDRESS>
265Chris Powell
2662002-12-18
267</ADDRESS>
268</BODY>
269</HTML>
diff --git a/docs/next.png b/docs/next.png
new file mode 100644
index 0000000..1628652
--- /dev/null
+++ b/docs/next.png
Binary files differ
diff --git a/docs/next_g.png b/docs/next_g.png
new file mode 100644
index 0000000..9d3f591
--- /dev/null
+++ b/docs/next_g.png
Binary files differ
diff --git a/docs/node1.html b/docs/node1.html
new file mode 100644
index 0000000..0238180
--- /dev/null
+++ b/docs/node1.html
@@ -0,0 +1,128 @@
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2
3<!--Converted with LaTeX2HTML 2002-1 (1.68)
4original version by: Nikos Drakos, CBLU, University of Leeds
5* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
6* with significant contributions from:
7 Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
8<HTML>
9<HEAD>
10<TITLE>Contents</TITLE>
11<META NAME="description" CONTENT="Contents">
12<META NAME="keywords" CONTENT="documentation">
13<META NAME="resource-type" CONTENT="document">
14<META NAME="distribution" CONTENT="global">
15
16<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
17<META NAME="Generator" CONTENT="LaTeX2HTML v2002-1">
18<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
19
20<LINK REL="STYLESHEET" HREF="documentation.css">
21
22<LINK REL="next" HREF="node2.html">
23<LINK REL="previous" HREF="documentation.html">
24<LINK REL="up" HREF="documentation.html">
25<LINK REL="next" HREF="node2.html">
26</HEAD>
27
28<BODY >
29<!--Navigation Panel-->
30<A NAME="tex2html97"
31 HREF="node2.html">
32<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
33<A NAME="tex2html95"
34 HREF="documentation.html">
35<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
36<A NAME="tex2html89"
37 HREF="documentation.html">
38<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
39<BR>
40<B> Next:</B> <A NAME="tex2html98"
41 HREF="node2.html">1 Introduction</A>
42<B> Up:</B> <A NAME="tex2html96"
43 HREF="documentation.html">Installing and Running mod_log_sql</A>
44<B> Previous:</B> <A NAME="tex2html90"
45 HREF="documentation.html">Installing and Running mod_log_sql</A>
46<BR>
47<BR>
48<!--End of Navigation Panel-->
49<BR>
50
51<H2><A NAME="SECTION00010000000000000000">
52Contents</A>
53</H2>
54<!--Table of Contents-->
55
56<UL>
57<LI><A NAME="tex2html99"
58 HREF="node2.html">1 Introduction</A>
59<UL>
60<LI><A NAME="tex2html100"
61 HREF="node2.html#SECTION00021000000000000000">1.1 Homepage </A>
62<LI><A NAME="tex2html101"
63 HREF="node2.html#SECTION00022000000000000000">1.2 Summary</A>
64<LI><A NAME="tex2html102"
65 HREF="node2.html#SECTION00023000000000000000">1.3 Approach</A>
66<LI><A NAME="tex2html103"
67 HREF="node2.html#SECTION00024000000000000000">1.4 What gets logged by default? </A>
68<LI><A NAME="tex2html104"
69 HREF="node2.html#SECTION00025000000000000000">1.5 Miscellaneous Notes</A>
70<LI><A NAME="tex2html105"
71 HREF="node2.html#SECTION00026000000000000000">1.6 Author / Maintainer</A>
72</UL>
73<BR>
74<LI><A NAME="tex2html106"
75 HREF="node3.html">2 Installation</A>
76<UL>
77<LI><A NAME="tex2html107"
78 HREF="node3.html#SECTION00031000000000000000">2.1 Requirements</A>
79<LI><A NAME="tex2html108"
80 HREF="node3.html#SECTION00032000000000000000">2.2 Platform-specific notes</A>
81<LI><A NAME="tex2html109"
82 HREF="node3.html#SECTION00033000000000000000">2.3 Do I want a DSO or a static module?</A>
83<LI><A NAME="tex2html110"
84 HREF="node3.html#SECTION00034000000000000000">2.4 Installation as an Apache DSO (Preferred) </A>
85<LI><A NAME="tex2html111"
86 HREF="node3.html#SECTION00035000000000000000">2.5 Installation as a static module compiled into
87httpd</A>
88</UL>
89<BR>
90<LI><A NAME="tex2html112"
91 HREF="node4.html">3 Configuration</A>
92<UL>
93<LI><A NAME="tex2html113"
94 HREF="node4.html#SECTION00041000000000000000">3.1 Preparing MySQL for logging</A>
95<LI><A NAME="tex2html114"
96 HREF="node4.html#SECTION00042000000000000000">3.2 A very basic logging setup in Apache</A>
97<LI><A NAME="tex2html115"
98 HREF="node4.html#SECTION00043000000000000000">3.3 Testing the basic setup</A>
99<LI><A NAME="tex2html116"
100 HREF="node4.html#SECTION00044000000000000000">3.4 How to tune logging with run-time directives</A>
101<LI><A NAME="tex2html117"
102 HREF="node4.html#SECTION00045000000000000000">3.5 Advanced logging scenarios</A>
103<LI><A NAME="tex2html118"
104 HREF="node4.html#SECTION00046000000000000000">3.6 Configuration directive reference</A>
105</UL>
106<BR>
107<LI><A NAME="tex2html119"
108 HREF="node5.html">4 FAQ</A>
109<UL>
110<LI><A NAME="tex2html120"
111 HREF="node5.html#SECTION00051000000000000000">4.1 General module questions</A>
112<LI><A NAME="tex2html121"
113 HREF="node5.html#SECTION00052000000000000000">4.2 Problems</A>
114<LI><A NAME="tex2html122"
115 HREF="node5.html#SECTION00053000000000000000">4.3 Performance and Tuning</A>
116<LI><A NAME="tex2html123"
117 HREF="node5.html#SECTION00054000000000000000">4.4 ``How do I...?'' - accomplishing certain tasks</A>
118</UL></UL>
119<!--End of Table of Contents-->
120
121<P>
122<BR><HR>
123<ADDRESS>
124Chris Powell
1252002-12-18
126</ADDRESS>
127</BODY>
128</HTML>
diff --git a/docs/node2.html b/docs/node2.html
new file mode 100644
index 0000000..33a2849
--- /dev/null
+++ b/docs/node2.html
@@ -0,0 +1,276 @@
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2
3<!--Converted with LaTeX2HTML 2002-1 (1.68)
4original version by: Nikos Drakos, CBLU, University of Leeds
5* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
6* with significant contributions from:
7 Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
8<HTML>
9<HEAD>
10<TITLE>1 Introduction</TITLE>
11<META NAME="description" CONTENT="1 Introduction">
12<META NAME="keywords" CONTENT="documentation">
13<META NAME="resource-type" CONTENT="document">
14<META NAME="distribution" CONTENT="global">
15
16<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
17<META NAME="Generator" CONTENT="LaTeX2HTML v2002-1">
18<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
19
20<LINK REL="STYLESHEET" HREF="documentation.css">
21
22<LINK REL="next" HREF="node3.html">
23<LINK REL="previous" HREF="node1.html">
24<LINK REL="up" HREF="documentation.html">
25<LINK REL="next" HREF="node3.html">
26</HEAD>
27
28<BODY >
29<!--Navigation Panel-->
30<A NAME="tex2html134"
31 HREF="node3.html">
32<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
33<A NAME="tex2html130"
34 HREF="documentation.html">
35<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
36<A NAME="tex2html124"
37 HREF="node1.html">
38<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
39<A NAME="tex2html132"
40 HREF="node1.html">
41<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
42<BR>
43<B> Next:</B> <A NAME="tex2html135"
44 HREF="node3.html">2 Installation</A>
45<B> Up:</B> <A NAME="tex2html131"
46 HREF="documentation.html">Installing and Running mod_log_sql</A>
47<B> Previous:</B> <A NAME="tex2html125"
48 HREF="node1.html">Contents</A>
49 &nbsp; <B> <A NAME="tex2html133"
50 HREF="node1.html">Contents</A></B>
51<BR>
52<BR>
53<!--End of Navigation Panel-->
54<!--Table of Child-Links-->
55<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
56
57<UL>
58<LI><A NAME="tex2html136"
59 HREF="node2.html#SECTION00021000000000000000">1.1 Homepage </A>
60<LI><A NAME="tex2html137"
61 HREF="node2.html#SECTION00022000000000000000">1.2 Summary</A>
62<LI><A NAME="tex2html138"
63 HREF="node2.html#SECTION00023000000000000000">1.3 Approach</A>
64<LI><A NAME="tex2html139"
65 HREF="node2.html#SECTION00024000000000000000">1.4 What gets logged by default? </A>
66<LI><A NAME="tex2html140"
67 HREF="node2.html#SECTION00025000000000000000">1.5 Miscellaneous Notes</A>
68<LI><A NAME="tex2html141"
69 HREF="node2.html#SECTION00026000000000000000">1.6 Author / Maintainer</A>
70</UL>
71<!--End of Table of Child-Links-->
72<HR>
73
74<H1><A NAME="SECTION00020000000000000000">
751 Introduction</A>
76</H1>
77
78<P>
79
80<H2><A NAME="SECTION00021000000000000000">
811.1 Homepage </A>
82</H2>
83
84<P>
85
86<DL COMPACT>
87<DT>
88<DD>http://www.grubbybaby.com/mod_log_sql/
89</DD>
90</DL>
91<P>
92
93<H2><A NAME="SECTION00022000000000000000">
941.2 Summary</A>
95</H2>
96
97<P>
98This Apache module will permit you to log to a SQL database; it can
99log each access request as well as data associated with each request:
100cookies, notes, and inbound/outbound headers. Unlike logging to a
101flat text file - which is standard in Apache - a SQL-based log exhibits
102tremendous flexibility and power of data extraction. (See section
103<A HREF="node5.html#sub:why">4.1.1</A> in the FAQ for further discussion and examples of the
104advantages to SQL.)
105
106<P>
107This module can either replace or happily coexist with mod_log_config,
108Apache's text file logging facility. In addition to being more configurable
109than the standard module, mod_log_sql is much more flexible.
110
111<P>
112
113<H2><A NAME="SECTION00023000000000000000">
1141.3 Approach</A>
115</H2>
116
117<P>
118This project was formerly known as ``mod_log_mysql.'' It was
119renamed ``mod_log_sql'' in order to reflect the project goal
120of database-inspecificity. The module currently supports MySQL, but
121support for other database backends is underway.
122
123<P>
124In order to save speed and overhead, links are kept alive in between
125queries. This module uses one dedicated SQL link per httpd child,
126opened by each child process when it is born. Among other things,
127this means that this module supports logging into only one MySQL server,
128and for now, also, only one SQL database. But that's a small tradeoff
129compared to the blinding speed of this module. Error reporting is
130robust throughout the module and will inform the administrator of
131database issues in the Apache E<SMALL>RROR</SMALL>L<SMALL>OG</SMALL> for the server/virtual
132server.
133
134<P>
135Virtual hosts are supported in the same manner they are in the regular
136logging modules. The administrator defines some basic 'global' directives
137in the main server config, then defines more specific 'local' directives
138inside each VirtualHost stanza.
139
140<P>
141A robust &#34;preserve&#34; capability has now been implemented.
142This permits the module to preserve any failed INSERT commands to
143a local file on its machine. In any situation that the database is
144unavailable - e.g. the network fails or the database host is rebooted
145- mod_log_sql will note this in the error log and begin appending
146its log entries to the preserve file (which is created with the user
147&amp; group ID of the running Apache process, e.g. &#34;nobody/nobody&#34;
148on many Linux installations). When database availablity returns, mod_log_sql
149seamlessly resumes logging to it. When convenient for the sysadmin,
150he/she can easily import the preserve file into the database because
151it is simply a series of SQL insert statements.
152
153<P>
154
155<H2><A NAME="SECTION00024000000000000000">
1561.4 What gets logged by default? </A>
157</H2>
158
159<P>
160All the data that would be contained in the &#34;Combined Log
161Format&#34; is logged by default, plus a little extra. Your best
162bet is to begin by accepting this default, then later customize the
163log configuration based on your needs.
164
165<P>
166The documentation of the run-time directives includes a full explanation
167of what you can log, including examples - see section <A HREF="node4.html#sec:ConfRef">3.6</A>.
168
169<P>
170
171<H2><A NAME="SECTION00025000000000000000">
1721.5 Miscellaneous Notes</A>
173</H2>
174
175<P>
176
177<UL>
178<LI>Note which directives go in the 'main server config' and which directives
179apply to the 'virtual host config'. This is made clear in the directive
180documentation.
181</LI>
182<LI>The 'time_stamp' field is stored in an UNSIGNED INTEGER column, in
183the standard unix ``seconds since the epoch'' format. This is
184superior to storing the access time as a string due to size requirements:
185an UNSIGNED INT requires 4 bytes, whereas an Apache date string -
186e.g. &#34;18/Nov/2001:13:59:52 -0800&#34; - requires 26
187bytes: those extra 22 bytes become significant when multiplied by
188thousands of accesses on a busy server. Besides, an INT type is far
189more flexible for comparisons, etc.
190
191<P>
192In MySQL 3.21 and above you can easily convert this to a human readable
193format using from_unixtime(), e.g.:
194
195<P>
196
197<DL COMPACT>
198<DT>
199<DD>select&nbsp;remote_host,request_uri,from_unixtime(time_stamp)&nbsp;from&nbsp;access_log;
200</DD>
201</DL>The enclosed perl program ``make_combined_log.pl'' extracts
202your access log in a format that is completely compatible with the
203Combined Log Format. You can then feed this to your favorite web log
204analysis tool.
205
206<P>
207</LI>
208<LI>The table's string values can be CHAR or VARCHAR, at a length of your
209choice. VARCHAR is superior because it truncates long strings; CHAR
210types are fixed-length and will be padded with spaces, resulting in
211waste. Just like the time_stamp issue described above, that kind
212of space waste multiplies over thousands of records.
213</LI>
214<LI>Be careful not to go overboard setting fields to NOT NULL. If a field
215is marked NOT NULL then it must contain data in the INSERT statement,
216or the INSERT will fail. These mysterious failures can be quite frustrating
217and difficult to debug.
218</LI>
219<LI>When Apache logs a numeric field, it uses a '-' character to mean
220``not applicable,'' e.g. the number of bytes returned on a 304
221(unchanged) request. Since '-' is an illegal character in an SQL numeric
222field, such fields are assigned the value 0 instead of '-' which,
223of course, makes perfect sense anyway.
224</LI>
225</UL>
226
227<P>
228
229<H2><A NAME="SECTION00026000000000000000">
2301.6 Author / Maintainer</A>
231</H2>
232
233<P>
234The actual logging code was taken from the already existing flat file
235text modules, so all that credit goes to the Apache Server group.
236
237<P>
238The MySQL routines and directives were added by Zeev Suraski &lt;bourbon@netvision.net.il&gt;.
239
240<P>
241All changes from 1.06+ and the new documentation were added by Chris
242Powell &lt;chris@grubbybaby.com&gt;. It seems that the module had fallen
243into the &#34;unmaintained&#34; category - it hadn't been
244updated since 1998 - so Chris adopted it as the new maintainer.
245
246<P>
247<HR>
248<!--Navigation Panel-->
249<A NAME="tex2html134"
250 HREF="node3.html">
251<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
252<A NAME="tex2html130"
253 HREF="documentation.html">
254<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
255<A NAME="tex2html124"
256 HREF="node1.html">
257<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
258<A NAME="tex2html132"
259 HREF="node1.html">
260<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
261<BR>
262<B> Next:</B> <A NAME="tex2html135"
263 HREF="node3.html">2 Installation</A>
264<B> Up:</B> <A NAME="tex2html131"
265 HREF="documentation.html">Installing and Running mod_log_sql</A>
266<B> Previous:</B> <A NAME="tex2html125"
267 HREF="node1.html">Contents</A>
268 &nbsp; <B> <A NAME="tex2html133"
269 HREF="node1.html">Contents</A></B>
270<!--End of Navigation Panel-->
271<ADDRESS>
272Chris Powell
2732002-12-18
274</ADDRESS>
275</BODY>
276</HTML>
diff --git a/docs/node3.html b/docs/node3.html
new file mode 100644
index 0000000..e832759
--- /dev/null
+++ b/docs/node3.html
@@ -0,0 +1,664 @@
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2
3<!--Converted with LaTeX2HTML 2002-1 (1.68)
4original version by: Nikos Drakos, CBLU, University of Leeds
5* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
6* with significant contributions from:
7 Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
8<HTML>
9<HEAD>
10<TITLE>2 Installation</TITLE>
11<META NAME="description" CONTENT="2 Installation">
12<META NAME="keywords" CONTENT="documentation">
13<META NAME="resource-type" CONTENT="document">
14<META NAME="distribution" CONTENT="global">
15
16<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
17<META NAME="Generator" CONTENT="LaTeX2HTML v2002-1">
18<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
19
20<LINK REL="STYLESHEET" HREF="documentation.css">
21
22<LINK REL="next" HREF="node4.html">
23<LINK REL="previous" HREF="node2.html">
24<LINK REL="up" HREF="documentation.html">
25<LINK REL="next" HREF="node4.html">
26</HEAD>
27
28<BODY >
29<!--Navigation Panel-->
30<A NAME="tex2html152"
31 HREF="node4.html">
32<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
33<A NAME="tex2html148"
34 HREF="documentation.html">
35<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
36<A NAME="tex2html142"
37 HREF="node2.html">
38<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
39<A NAME="tex2html150"
40 HREF="node1.html">
41<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
42<BR>
43<B> Next:</B> <A NAME="tex2html153"
44 HREF="node4.html">3 Configuration</A>
45<B> Up:</B> <A NAME="tex2html149"
46 HREF="documentation.html">Installing and Running mod_log_sql</A>
47<B> Previous:</B> <A NAME="tex2html143"
48 HREF="node2.html">1 Introduction</A>
49 &nbsp; <B> <A NAME="tex2html151"
50 HREF="node1.html">Contents</A></B>
51<BR>
52<BR>
53<!--End of Navigation Panel-->
54<!--Table of Child-Links-->
55<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
56
57<UL>
58<LI><A NAME="tex2html154"
59 HREF="node3.html#SECTION00031000000000000000">2.1 Requirements</A>
60<LI><A NAME="tex2html155"
61 HREF="node3.html#SECTION00032000000000000000">2.2 Platform-specific notes</A>
62<UL>
63<LI><A NAME="tex2html156"
64 HREF="node3.html#SECTION00032100000000000000">2.2.1 Solaris</A>
65<LI><A NAME="tex2html157"
66 HREF="node3.html#SECTION00032200000000000000">2.2.2 BSD</A>
67<LI><A NAME="tex2html158"
68 HREF="node3.html#SECTION00032300000000000000">2.2.3 Win32</A>
69</UL>
70<BR>
71<LI><A NAME="tex2html159"
72 HREF="node3.html#SECTION00033000000000000000">2.3 Do I want a DSO or a static module?</A>
73<LI><A NAME="tex2html160"
74 HREF="node3.html#SECTION00034000000000000000">2.4 Installation as an Apache DSO (Preferred) </A>
75<LI><A NAME="tex2html161"
76 HREF="node3.html#SECTION00035000000000000000">2.5 Installation as a static module compiled into
77httpd</A>
78</UL>
79<!--End of Table of Child-Links-->
80<HR>
81
82<H1><A NAME="SECTION00030000000000000000">
832 Installation</A>
84</H1>
85
86<P>
87
88<H2><A NAME="SECTION00031000000000000000">
892.1 Requirements</A>
90</H2>
91
92<P>
93
94<UL>
95<LI>A compatible system. mod_log_sql was authored and tested on systems
96based on Red Hat Linux (Red Hat, Mandrake), but the module should
97easily adapt to any modern distribution. mod_log_sql has also been
98ported successfully to Solaris and FreeBSD.
99</LI>
100<LI>Apache 1.2 or 1.3. Ideally you should already have successfully compiled
101Apache and understand the process, but this document tries to make
102it simple for beginners.
103</LI>
104<LI>The MySQL development headers. This package is called different things
105on different distros. For example, Red Hat 6.x calls this RPM ``MySQL-devel''
106whereas Mandrake calls it ``libmysql10-devel.''
107</LI>
108<LI>MySQL &gt;= 3.23.15 configured, installed and running on either localhost
109or an accessible networked machine. You should already have a basic
110understanding of MySQL and how it functions.
111</LI>
112<LI>Optionally, if you want to be able to log SSL information such as
113keysize or cipher, you need OpenSSL and mod_ssl installed.
114</LI>
115</UL>
116
117<P>
118
119<H2><A NAME="SECTION00032000000000000000">
1202.2 Platform-specific notes</A>
121</H2>
122
123<P>
124These installation documents assume a relatively modern GNU/Linux
125scenario. mod_log_sql has been ported to other platforms; following
126are notes on compiling the module for those platforms.
127
128<P>
129
130<H3><A NAME="SECTION00032100000000000000">
1312.2.1 Solaris</A>
132</H3>
133
134<P>
135The nanosleep() function used in mod_log_sql relies on linking aginst
136the librt library. Make the following alterations before proceeding:
137
138<P>
139
140<OL>
141<LI>In Makefile, search for the string ``-lmysqlclient -lz'' and change
142it to read ``-lmysqlclient -lz -lrt''
143</LI>
144<LI>In part <A HREF="node3.html#step:Linking">8a</A> of section <A HREF="node3.html#sec:Static">2.5</A> below, change
145``-lmysqlclient -lm -lz'' to read ``-lmysqlclient -lm -lz -lrt''
146</LI>
147</OL>
148
149<P>
150
151<H3><A NAME="SECTION00032200000000000000">
1522.2.2 BSD</A>
153</H3>
154
155<P>
156No notes are available at present, but they are desired. If you have
157successfully ported mod_log_sql to BSD, <I>please</I> contact the maintaniner, Chris Powell (chris@grubbybaby.com)
158and help fill in this section.
159
160<P>
161
162<H3><A NAME="SECTION00032300000000000000">
1632.2.3 Win32</A>
164</H3>
165
166<P>
167No notes are available at present, but they are desired. If you have
168successfully ported mod_log_sql to Win32, <I>please</I> contact
169the maintaniner, Chris Powell (chris@grubbybaby.com) and help
170fill in this section.
171
172<P>
173
174<H2><A NAME="SECTION00033000000000000000">
1752.3 Do I want a DSO or a static module?</A>
176</H2>
177
178<P>
179You need to know the answer to this question before you proceed. The
180answer is pretty straightforward: what have you done in the past?
181If you like all your Apache modules to be dynamic, then you should
182keep doing that. If you're more of an old-school type and prefer to
183compile the modules right into apache, do that. Both methods work
184equally well.
185
186<P>
187FWIW, the DSO method is more modern and increasing in popularity because
188apxs takes care of a lot of dirty little details for you. As you'll
189see below, the static-module method is a little more complex.
190
191<P>
192
193<H2><A NAME="SECTION00034000000000000000">
1942.4 Installation as an Apache DSO (Preferred) </A>
195</H2>
196
197<P>
198
199<OL>
200<LI>Perform all the following steps as root so that you have install privs,
201etc. Unpack the archive into a working directory.
202
203<P>
204
205<DL COMPACT>
206<DT>
207<DD>#&nbsp;tar&nbsp;zxf&nbsp;mod_log_sql.tar.gz&nbsp;-C&nbsp;/usr/local/src&nbsp;
208
209<P>
210#&nbsp;cd&nbsp;/usr/local/src/mod_log_sql
211</DD>
212</DL>
213</LI>
214<LI>Edit Makefile and change the values of the variables in the first
215section.
216
217<P>
218
219<OL>
220<LI>These paths are <B>necessary:</B>
221
222<P>
223<DL>
224<DT><STRONG>APACHEINSTALLED:</STRONG></DT>
225<DD>the location where you installed Apache - usually
226/usr/local/apache, 'locate apxs' can help you find it.
227</DD>
228<DT><STRONG>APACHEHEADERS:</STRONG></DT>
229<DD>The location of your Apache header files, find using
230'locate httpd.h'
231</DD>
232<DT><STRONG>MYSQLLIBRARIES:</STRONG></DT>
233<DD>The location of your MySQL libraries, find using
234'locate libmysqlclient.so'
235</DD>
236<DT><STRONG>MYSQLHEADERS:</STRONG></DT>
237<DD>The location of your MySQL header files, find using
238'locate mysql.h'
239</DD>
240</DL>
241</LI>
242<LI><B>Optional</B>: if you compiled mod_ssl for Apache and want to
243log SSL data such as 'keysize' and 'cipher type':
244
245<P>
246<DL>
247<DT><STRONG>MODSSLHEADERS:</STRONG></DT>
248<DD>the location of your mod_ssl header files, find
249using 'locate mod_ssl.h'
250</DD>
251<DT><STRONG>DB1HEADERS:</STRONG></DT>
252<DD>the location of your db1 header files, find using 'locate
253ndbm.h'
254</DD>
255</DL>
256</LI>
257</OL>
258You do <B>not</B> need to compile SSL support into mod_log_sql
259in order to simply use it with a secure site. You only need to compile
260SSL support into mod_log_sql <B>if you want to log SSL-specific
261data</B> such as the cipher type.
262
263<P>
264</LI>
265<LI>IMPORTANT: If you are not logging SSL info, comment out MODSSLHDRS
266by putting a # character in front of it:
267
268<P>
269
270<DL COMPACT>
271<DT>
272<DD>#MODSSLHDRS=/usr/include/...
273</DD>
274</DL>
275</LI>
276<LI>Instruct apxs to compile the module as a DSO.
277
278<P>
279
280<DL COMPACT>
281<DT>
282<DD>#&nbsp;make&nbsp;dso
283</DD>
284</DL>You should see output similar to the following:
285
286<P>
287
288<DL COMPACT>
289<DT>
290<DD>/usr/local/Apache/bin/apxs&nbsp;-Wc,-O2&nbsp;-Wc,-Wall&nbsp;-Wc,-DEAPI&nbsp;-c&nbsp;-I/usr/...
291
292<P>
293gcc&nbsp;-DLINUX=22&nbsp;-DNO_DBM_REWRITEMAP&nbsp;-DMOD_SSL=208111&nbsp;-DUSE_HS...&nbsp;
294
295<P>
296gcc&nbsp;-shared&nbsp;-o&nbsp;mod_log_sql.so&nbsp;mod_log_sql.o&nbsp;-Wc,-O2&nbsp;-Wc,-Wall&nbsp;-Wc...
297</DD>
298</DL>You should see no errors and have a new file called &#34;mod_log_sql.so&#34;
299in your directory.
300
301<P>
302</LI>
303<LI>Instruct apxs to install the DSO.
304
305<P>
306
307<DL COMPACT>
308<DT>
309<DD>#&nbsp;make&nbsp;dsoinstall
310</DD>
311</DL>You should see output similar to the following:
312
313<P>
314
315<DL COMPACT>
316<DT>
317<DD>/usr/local/Apache/bin/apxs&nbsp;-i&nbsp;mod_log_sql.so&nbsp;
318
319<P>
320cp&nbsp;mod_log_sql.so&nbsp;/usr/local/Apache/libexec/mod_log_sql.so&nbsp;
321
322<P>
323chmod&nbsp;755&nbsp;/usr/local/Apache/libexec/mod_log_sql.so&nbsp;
324</DD>
325</DL>
326</LI>
327<LI>Load and activate the module in httpd.conf:
328
329<P>
330
331<OL>
332<LI>Insert this line in the same area as other logging modules, e.g. near
333``LoadModule config_log_module'':
334
335<P>
336
337<DL COMPACT>
338<DT>
339<DD>LoadModule&nbsp;sql_log_module&nbsp;libexec/mod_log_sql.so
340</DD>
341</DL>
342</LI>
343<LI>Insert this line in the same area as other logging modules, e.g. near
344``AddModule mod_log_config.c'':
345
346<P>
347
348<DL COMPACT>
349<DT>
350<DD>AddModule&nbsp;mod_log_sql.c
351</DD>
352</DL>
353</LI>
354</OL>
355</LI>
356<LI>Module ordering within httpd.conf is important if you are logging
357SSL information. Please ensure that
358
359<P>
360
361<DL COMPACT>
362<DT>
363<DD>LoadModule&nbsp;ssl_module&nbsp;libexec/libssl.so
364</DD>
365</DL>comes before
366
367<P>
368
369<DL COMPACT>
370<DT>
371<DD>LoadModule&nbsp;sql_log_module&nbsp;libexec/mod_log_sql.so
372</DD>
373</DL>in your httpd.conf file. If they are out of order, simply cut-and-paste
374the ``ssl_module'' section so that it is at the top. If you do
375not, you will get this error when you start Apache:
376
377<P>
378
379<DL COMPACT>
380<DT>
381<DD>/usr/local/apache/libexec/mod_log_mysql.so:&nbsp;undefined&nbsp;symbol:&nbsp;ssl_var_lookup
382
383<P>
384/usr/local/apache/bin/apachectl&nbsp;startssl:&nbsp;httpd&nbsp;could&nbsp;not&nbsp;be&nbsp;started
385</DD>
386</DL>(mod_log_sql has a dependency on mod_ssl for SSL symbols. If the
387statements are out of order, mod_log_sql cannot recognize those
388symbols.)
389
390<P>
391Now skip below to section <A HREF="node4.html#sec:Configuration">3</A>, <B>Configuration</B>.
392
393<P>
394</LI>
395</OL>
396
397<P>
398
399<H2><A NAME="SECTION00035000000000000000"></A><A NAME="sec:Static"></A>
400<BR>
4012.5 Installation as a static module compiled into
402httpd
403</H2>
404
405<P>
406
407<OL>
408<LI>Perform all the following steps as root so that you have install privs,
409etc.
410</LI>
411<LI>Unpack the archive into a working directory.
412
413<P>
414
415<DL COMPACT>
416<DT>
417<DD>#&nbsp;tar&nbsp;zxf&nbsp;mod_log_sql.tar.gz&nbsp;-C&nbsp;/usr/local/src&nbsp;
418
419<P>
420#&nbsp;cd&nbsp;/usr/local/src/mod_log_sql
421</DD>
422</DL>
423</LI>
424<LI><A NAME="step:editMF"></A>Edit Makefile and change the values of the variables
425in the first section.
426
427<P>
428
429<OL>
430<LI>These are <B>necessary:</B>
431
432<P>
433<DL>
434<DT><STRONG>APACHEINSTALLED:</STRONG></DT>
435<DD>the location where you installed Apache - usually
436/usr/local/apache, 'locate apxs' can help you find it.
437</DD>
438<DT><STRONG>APACHESOURCE:</STRONG></DT>
439<DD>the location of your Apache <B>sources</B>, find
440using 'locate ABOUT_APACHE'
441</DD>
442<DT><STRONG>APACHEHEADERS:</STRONG></DT>
443<DD>the location of your Apache header files, find using
444'locate httpd.h'
445</DD>
446<DT><STRONG>MYSQLLIBRARIES:</STRONG></DT>
447<DD>the location of your MySQL libraries, find using
448'locate libmysqlclient.so'
449</DD>
450<DT><STRONG>MYSQLHEADERS:</STRONG></DT>
451<DD>the location of your MySQL header files, find using
452'locate mysql.h'
453</DD>
454</DL>
455</LI>
456<LI><B>Optional</B>: if you compiled mod_ssl for Apache and want to
457log SSL data such as 'keysize' and 'cipher type':
458
459<P>
460<DL>
461<DT><STRONG>MODSSLHEADERS:</STRONG></DT>
462<DD>the location of your mod_ssl header files, find
463using 'locate mod_ssl.h'
464</DD>
465<DT><STRONG>DB1HEADERS:</STRONG></DT>
466<DD>the location of your db1 header files, find using 'locate
467ndbm.h'
468</DD>
469</DL>
470</LI>
471</OL>
472You do <B>not</B> need to compile SSL support into mod_log_sql
473in order to simply use it with a secure site. You only need to compile
474SSL support into mod_log_sql <B>if you want to log SSL-specific
475data</B> such as the cipher type.
476
477<P>
478</LI>
479<LI>IMPORTANT: If you are not logging SSL info, comment out MODSSLHDRS
480by putting a # character in front of it:
481
482<P>
483
484<DL COMPACT>
485<DT>
486<DD>#MODSSLHDRS=/usr/include/...
487</DD>
488</DL>
489</LI>
490<LI>Compile the module.
491
492<P>
493
494<DL COMPACT>
495<DT>
496<DD>#&nbsp;make&nbsp;static
497</DD>
498</DL>You should see output similar to the following:
499
500<P>
501
502<DL COMPACT>
503<DT>
504<DD>gcc&nbsp;-fpic&nbsp;-O2&nbsp;-Wall&nbsp;-I/usr/local/Apache/include&nbsp;-I/usr/include/mysql&nbsp;-I/usr/lo...
505</DD>
506</DL>You should see no errors and have a new file called &#34;mod_log_sql.o&#34;
507in your directory.
508
509<P>
510</LI>
511<LI>Install the module.
512
513<P>
514
515<DL COMPACT>
516<DT>
517<DD>#&nbsp;make&nbsp;statinstall
518</DD>
519</DL>
520</LI>
521<LI>Change to your Apache source directory.
522
523<P>
524
525<DL COMPACT>
526<DT>
527<DD>#&nbsp;cd&nbsp;/usr/local/src/apache-1.3.22/src
528</DD>
529</DL>
530</LI>
531<LI>Re-compile your httpd binary as follows.
532
533<P>
534
535<OL>
536<LI><A NAME="step:Linking"></A>Make these changes to Configuration.apaci:
537
538<P>
539
540<UL>
541<LI>Append the following string to the EXTRA_LIBS= line. (&#34;/usr/lib/mysql&#34;
542is from step <A HREF="node3.html#step:editMF">3</A>, and is where your MySQL libraries
543live):
544</LI>
545</UL>
546
547<DL COMPACT>
548<DT>
549<DD>-L/usr/lib/mysql&nbsp;-lmysqlclient&nbsp;-lm&nbsp;-lz
550</DD>
551</DL>
552<UL>
553<LI>Find the mod_log_config.o line, and insert this line immediately
554after it:
555</LI>
556</UL>
557
558<DL COMPACT>
559<DT>
560<DD>AddModule&nbsp;modules/sql/mod_log_sql.o
561</DD>
562</DL>
563</LI>
564<LI># cp Configuration.apaci Configuration
565</LI>
566<LI># ./Configure
567</LI>
568<LI># make
569</LI>
570<LI># strip httpd
571</LI>
572</OL>
573</LI>
574<LI>Test your new apache binary:
575
576<P>
577
578<DL COMPACT>
579<DT>
580<DD>#&nbsp;./httpd&nbsp;-l
581</DD>
582</DL>You should see something like:
583
584<P>
585
586<DL COMPACT>
587<DT>
588<DD>Compiled-in&nbsp;modules:&nbsp;
589
590<P>
591http_core.c
592
593<P>
594mod_log_sql.c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;-&nbsp;That's&nbsp;the&nbsp;line&nbsp;you're&nbsp;looking&nbsp;for.
595
596<P>
597mod_env.c&nbsp;
598
599<P>
600mod_log_config.c&nbsp;
601
602<P>
603mod_mime.c&nbsp;
604
605<P>
606mod_negotiation.c
607
608<P>
609etc...
610</DD>
611</DL>
612</LI>
613<LI>Install your httpd binary. Copy it over your old httpd binary, wherever
614it lives. You can and should rename your old httpd first so that you
615can easily revert to that working version in case of bugs with the
616new version.
617
618<P>
619
620<DL COMPACT>
621<DT>
622<DD>#&nbsp;/etc/rc.d/init.d/httpd&nbsp;stop&nbsp;
623
624<P>
625#&nbsp;mv&nbsp;/usr/local/Apache/bin/httpd&nbsp;~/httpd-save&nbsp;
626
627<P>
628#&nbsp;cp&nbsp;-f&nbsp;./httpd&nbsp;/usr/local/Apache/bin/
629</DD>
630</DL>
631</LI>
632</OL>
633
634<P>
635<HR>
636<!--Navigation Panel-->
637<A NAME="tex2html152"
638 HREF="node4.html">
639<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
640<A NAME="tex2html148"
641 HREF="documentation.html">
642<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
643<A NAME="tex2html142"
644 HREF="node2.html">
645<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
646<A NAME="tex2html150"
647 HREF="node1.html">
648<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
649<BR>
650<B> Next:</B> <A NAME="tex2html153"
651 HREF="node4.html">3 Configuration</A>
652<B> Up:</B> <A NAME="tex2html149"
653 HREF="documentation.html">Installing and Running mod_log_sql</A>
654<B> Previous:</B> <A NAME="tex2html143"
655 HREF="node2.html">1 Introduction</A>
656 &nbsp; <B> <A NAME="tex2html151"
657 HREF="node1.html">Contents</A></B>
658<!--End of Navigation Panel-->
659<ADDRESS>
660Chris Powell
6612002-12-18
662</ADDRESS>
663</BODY>
664</HTML>
diff --git a/docs/node4.html b/docs/node4.html
new file mode 100644
index 0000000..287333c
--- /dev/null
+++ b/docs/node4.html
@@ -0,0 +1,2014 @@
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2
3<!--Converted with LaTeX2HTML 2002-1 (1.68)
4original version by: Nikos Drakos, CBLU, University of Leeds
5* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
6* with significant contributions from:
7 Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
8<HTML>
9<HEAD>
10<TITLE>3 Configuration</TITLE>
11<META NAME="description" CONTENT="3 Configuration">
12<META NAME="keywords" CONTENT="documentation">
13<META NAME="resource-type" CONTENT="document">
14<META NAME="distribution" CONTENT="global">
15
16<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
17<META NAME="Generator" CONTENT="LaTeX2HTML v2002-1">
18<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
19
20<LINK REL="STYLESHEET" HREF="documentation.css">
21
22<LINK REL="next" HREF="node5.html">
23<LINK REL="previous" HREF="node3.html">
24<LINK REL="up" HREF="documentation.html">
25<LINK REL="next" HREF="node5.html">
26</HEAD>
27
28<BODY >
29<!--Navigation Panel-->
30<A NAME="tex2html172"
31 HREF="node5.html">
32<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
33<A NAME="tex2html168"
34 HREF="documentation.html">
35<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
36<A NAME="tex2html162"
37 HREF="node3.html">
38<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
39<A NAME="tex2html170"
40 HREF="node1.html">
41<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
42<BR>
43<B> Next:</B> <A NAME="tex2html173"
44 HREF="node5.html">4 FAQ</A>
45<B> Up:</B> <A NAME="tex2html169"
46 HREF="documentation.html">Installing and Running mod_log_sql</A>
47<B> Previous:</B> <A NAME="tex2html163"
48 HREF="node3.html">2 Installation</A>
49 &nbsp; <B> <A NAME="tex2html171"
50 HREF="node1.html">Contents</A></B>
51<BR>
52<BR>
53<!--End of Navigation Panel-->
54<!--Table of Child-Links-->
55<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
56
57<UL>
58<LI><A NAME="tex2html174"
59 HREF="node4.html#SECTION00041000000000000000">3.1 Preparing MySQL for logging</A>
60<LI><A NAME="tex2html175"
61 HREF="node4.html#SECTION00042000000000000000">3.2 A very basic logging setup in Apache</A>
62<LI><A NAME="tex2html176"
63 HREF="node4.html#SECTION00043000000000000000">3.3 Testing the basic setup</A>
64<LI><A NAME="tex2html177"
65 HREF="node4.html#SECTION00044000000000000000">3.4 How to tune logging with run-time directives</A>
66<UL>
67<LI><A NAME="tex2html178"
68 HREF="node4.html#SECTION00044100000000000000">3.4.1 Instructing the module what to log</A>
69<LI><A NAME="tex2html179"
70 HREF="node4.html#SECTION00044200000000000000">3.4.2 Instructing the module what NOT to log using filtering
71directives</A>
72</UL>
73<BR>
74<LI><A NAME="tex2html180"
75 HREF="node4.html#SECTION00045000000000000000">3.5 Advanced logging scenarios</A>
76<UL>
77<LI><A NAME="tex2html181"
78 HREF="node4.html#SECTION00045100000000000000">3.5.1 Using the module in an ISP environment</A>
79<LI><A NAME="tex2html182"
80 HREF="node4.html#SECTION00045200000000000000">3.5.2 Logging many-to-one data in separate tables</A>
81<LI><A NAME="tex2html183"
82 HREF="node4.html#SECTION00045300000000000000">3.5.3 Using the same database for production and test</A>
83<LI><A NAME="tex2html184"
84 HREF="node4.html#SECTION00045400000000000000">3.5.4 Optimizing for a busy database</A>
85</UL>
86<BR>
87<LI><A NAME="tex2html185"
88 HREF="node4.html#SECTION00046000000000000000">3.6 Configuration directive reference</A>
89<UL>
90<LI><A NAME="tex2html186"
91 HREF="node4.html#SECTION00046100000000000000">3.6.1 LogSQLCookieLogTable</A>
92<LI><A NAME="tex2html187"
93 HREF="node4.html#SECTION00046200000000000000">3.6.2 LogSQLCreateTables</A>
94<LI><A NAME="tex2html188"
95 HREF="node4.html#SECTION00046300000000000000">3.6.3 LogSQLDatabase </A>
96<LI><A NAME="tex2html189"
97 HREF="node4.html#SECTION00046400000000000000">3.6.4 LogSQLForcePreserve</A>
98<LI><A NAME="tex2html190"
99 HREF="node4.html#SECTION00046500000000000000">3.6.5 LogSQLHeadersInLogTable</A>
100<LI><A NAME="tex2html191"
101 HREF="node4.html#SECTION00046600000000000000">3.6.6 LogSQLHeadersOutLogTable</A>
102<LI><A NAME="tex2html192"
103 HREF="node4.html#SECTION00046700000000000000">3.6.7 LogSQLLoginInfo </A>
104<LI><A NAME="tex2html193"
105 HREF="node4.html#SECTION00046800000000000000">3.6.8 LogSQLMachineID</A>
106<LI><A NAME="tex2html194"
107 HREF="node4.html#SECTION00046900000000000000">3.6.9 LogSQLMassVirtualHosting</A>
108<LI><A NAME="tex2html195"
109 HREF="node4.html#SECTION000461000000000000000">3.6.10 LogSQLNotesLogTable</A>
110<LI><A NAME="tex2html196"
111 HREF="node4.html#SECTION000461100000000000000">3.6.11 LogSQLPreserveFile</A>
112<LI><A NAME="tex2html197"
113 HREF="node4.html#SECTION000461200000000000000">3.6.12 LogSQLRemhostIgnore</A>
114<LI><A NAME="tex2html198"
115 HREF="node4.html#SECTION000461300000000000000">3.6.13 LogSQLRequestAccept</A>
116<LI><A NAME="tex2html199"
117 HREF="node4.html#SECTION000461400000000000000">3.6.14 LogSQLRequestIgnore</A>
118<LI><A NAME="tex2html200"
119 HREF="node4.html#SECTION000461500000000000000">3.6.15 LogSQLSocketFile </A>
120<LI><A NAME="tex2html201"
121 HREF="node4.html#SECTION000461600000000000000">3.6.16 LogSQLTCPPort</A>
122<LI><A NAME="tex2html202"
123 HREF="node4.html#SECTION000461700000000000000">3.6.17 LogSQLTransferLogFormat </A>
124<LI><A NAME="tex2html203"
125 HREF="node4.html#SECTION000461800000000000000">3.6.18 LogSQLTransferLogTable</A>
126<LI><A NAME="tex2html204"
127 HREF="node4.html#SECTION000461900000000000000">3.6.19 LogSQLWhichCookie</A>
128<LI><A NAME="tex2html205"
129 HREF="node4.html#SECTION000462000000000000000">3.6.20 LogSQLWhichCookies</A>
130<LI><A NAME="tex2html206"
131 HREF="node4.html#SECTION000462100000000000000">3.6.21 LogSQLWhichHeadersIn</A>
132<LI><A NAME="tex2html207"
133 HREF="node4.html#SECTION000462200000000000000">3.6.22 LogSQLWhichHeadersOut</A>
134<LI><A NAME="tex2html208"
135 HREF="node4.html#SECTION000462300000000000000">3.6.23 LogSQLWhichNotes</A>
136</UL></UL>
137<!--End of Table of Child-Links-->
138<HR>
139
140<H1><A NAME="SECTION00040000000000000000"></A><A NAME="sec:Configuration"></A>
141<BR>
1423 Configuration
143</H1>
144
145<P>
146
147<H2><A NAME="SECTION00041000000000000000"></A><A NAME="sub:PrepDb"></A>
148<BR>
1493.1 Preparing MySQL for logging
150</H2>
151
152<P>
153You have to prepare the database to receive data from mod_log_sql,
154and set up run-time directives in httpd.conf to control how and what
155mod_log_sql logs.
156
157<P>
158This section will discuss how to get started with a basic config.
159Full documentation of all available run-time directives is available
160in section <A HREF="node4.html#sec:ConfRef">3.6</A>.
161
162<P>
163
164<OL>
165<LI>mod_log_sql can make its own tables on-the-fly, or you can pre-make
166the tables by hand. The advantage of letting the module make the tables
167is ease-of-use, but for raw performance you will want to pre-make
168the tables in order to save some overhead. In this basic setup we'll
169just let the module create tables for us.
170</LI>
171<LI>We still need to have a logging database created and ready, so run
172the MySQL command line client and create a database:
173
174<P>
175
176<DL COMPACT>
177<DT>
178<DD>#&nbsp;mysql&nbsp;-uadmin&nbsp;-pmypassword&nbsp;
179
180<P>
181Enter&nbsp;password:
182
183<P>
184mysql&gt;&nbsp;create&nbsp;database&nbsp;apachelogs;
185</DD>
186</DL>
187</LI>
188<LI><A NAME="part:CrTbl"></A>If you want to hand-create the tables, run the
189enclosed 'create-tables' SQL script as follows:
190
191<P>
192
193<DL COMPACT>
194<DT>
195<DD>mysql&gt;&nbsp;source&nbsp;create_tables.sql
196</DD>
197</DL>
198</LI>
199<LI>Create a specific MySQL userid that httpd will use to authenticate
200and enter data. This userid need not be an actual Unix user. It is
201a userid internal to MySQL with specific privileges. In the following
202example command, &#34;apachelogs&#34; is the database, &#34;loguser&#34;
203is the userid to create, &#34;my.apachemachine.com&#34;
204is the name of the Apache machine, and &#34;l0gger&#34;
205is the password to assign. Choose values that are different from these
206examples.
207
208<P>
209
210<DL COMPACT>
211<DT>
212<DD>mysql&gt;&nbsp;grant&nbsp;insert,create&nbsp;on&nbsp;apachelogs.*&nbsp;to&nbsp;loguser@my.apachemachine.com
213
214<P>
215identified&nbsp;by&nbsp;'l0gger';
216</DD>
217</DL>
218</LI>
219<LI>You may be especially security-paranoid and want &#34;loguser&#34;
220to <I>not</I> have &#34;create&#34; capability within the
221&#34;apachelogs&#34; database. You can disable that privilege,
222but the cost is that you will not be able to use the module's on-the-fly
223table creation feature. If that cost is acceptable, hand-create the
224tables as described in step <A HREF="node4.html#part:CrTbl">3</A> and use the following
225GRANT statement instead of the one above:
226
227<P>
228
229<DL COMPACT>
230<DT>
231<DD>mysql&gt;&nbsp;grant&nbsp;insert&nbsp;on&nbsp;apachelogs.*&nbsp;to&nbsp;loguser@my.apachemachine.com
232
233<P>
234identified&nbsp;by&nbsp;'l0gger';
235</DD>
236</DL>
237</LI>
238<LI><A NAME="step:EnaLog"></A>Enable full logging of your MySQL daemon (at least
239temporarily for debugging purposes) if you don't do this already.
240Edit /etc/my.cnf and add the following line to your [mysqld] section:
241
242<P>
243
244<DL COMPACT>
245<DT>
246<DD>log=/var/log/mysql-messages
247</DD>
248</DL>Then restart MySQL.
249
250<P>
251
252<DL COMPACT>
253<DT>
254<DD>#&nbsp;/etc/rc.d/init.d/mysql&nbsp;restart
255</DD>
256</DL>
257</LI>
258</OL>
259
260<P>
261
262<H2><A NAME="SECTION00042000000000000000">
2633.2 A very basic logging setup in Apache</A>
264</H2>
265
266<P>
267
268<OL>
269<LI>Tell the module what database to use and the appropriate authentication
270information.
271
272<P>
273So, edit httpd.conf and insert the following lines somewhere after
274any LoadModule / AddModule statements. <I>Make sure these statements
275are ``global,'' i.e. not inside any VirtualHost stanza</I>. You will
276also note that you are embedding a password in the file. Therefore
277you are advised to ``chmod 660 httpd.conf'' to prevent unauthorized
278regular users from viewing your database user and password.
279
280<P>
281<B>Example</B>: Use the MySQL database called &#34;apachelogs&#34;
282running on &#34;dbmachine.foo.com&#34;. Use username &#34;loguser&#34;
283and password &#34;l0gg3r&#34; to authenticate to the database.
284Permit the module create tables for us.
285
286<P>
287
288<DL COMPACT>
289<DT>
290<DD>LogSQLLoginInfo&nbsp;dbmachine.foo.com&nbsp;loguser&nbsp;l0gg3r&nbsp;
291
292<P>
293LogSQLDatabase&nbsp;apachelogs
294
295<P>
296LogSQLCreateTables&nbsp;on
297</DD>
298</DL>If your database resides on localhost instead of another host, specify
299the MySQL server's socket file as follows:
300
301<P>
302
303<DL COMPACT>
304<DT>
305<DD>LogSQLSocketFile&nbsp;/your/path/to/mysql.sock
306</DD>
307</DL>If your database is listening on a port other than 3306, specify the
308correct TCP port as follows:
309
310<P>
311
312<DL COMPACT>
313<DT>
314<DD>LogSQLTCPPort&nbsp;1234
315</DD>
316</DL>
317</LI>
318<LI>The actual logging is set up on a virtual-host-by-host basis. So,
319skip down to the virtual host you want to set up. Instruct this virtual
320host to log entries to the table ``access_log'' by inserting
321a L<SMALL>OG</SMALL>SQLT<SMALL>RANSFER</SMALL>L<SMALL>OG</SMALL>T<SMALL>ABLE</SMALL> directive. (The L<SMALL>OG</SMALL>SQLT<SMALL>RANSFER</SMALL>L<SMALL>OG</SMALL>T<SMALL>ABLE</SMALL>
322directive is the minimum required to log - other directives that
323you'll learn about later simply tune the module's behavior.)
324
325<P>
326
327<DL COMPACT>
328<DT>
329<DD>&lt;VirtualHost&nbsp;1.2.3.4&gt;
330
331<P>
332&nbsp;[snip]
333
334<P>
335&nbsp;LogSQLTransferLogTable&nbsp;access_log
336
337<P>
338&nbsp;[snip]
339
340<P>
341&lt;/VirtualHost&gt;
342</DD>
343</DL>
344</LI>
345<LI>Restart apache.
346
347<P>
348
349<DL COMPACT>
350<DT>
351<DD>#&nbsp;/etc/rc.d/init.d/httpd&nbsp;stop
352
353<P>
354#&nbsp;/etc/rc.d/init.d/httpd&nbsp;start
355</DD>
356</DL>
357</LI>
358</OL>
359
360<P>
361
362<H2><A NAME="SECTION00043000000000000000">
3633.3 Testing the basic setup</A>
364</H2>
365
366<P>
367
368<OL>
369<LI>Visit your web site in a browser to trigger some hits, then confirm
370that the entries are being successfully logged:
371
372<P>
373
374<DL COMPACT>
375<DT>
376<DD>#&nbsp;mysql&nbsp;-hdbmachine.foo.com&nbsp;-umysqladmin&nbsp;-p&nbsp;-e&nbsp;&#34;select&nbsp;*&nbsp;from&nbsp;access_log&#34;&nbsp;apachelogs&nbsp;
377
378<P>
379Enter&nbsp;password:
380</DD>
381</DL>Several lines of output should follow, corresponding to your hits
382on the site. You now have basic functionality. Don't disable your
383regular Apache logs until you feel comfortable that the database is
384behaving as you'd like and that things are going well. If you do not
385see any entries in the access_log, please consult section <A HREF="node5.html#faq:NothingLogged">4.2.2</A>
386of the FAQ on how to debug and fix the situation.
387
388<P>
389</LI>
390<LI>You can now activate the advanced features of mod_log_sql, which
391are described in the next section.
392</LI>
393</OL>
394
395<P>
396
397<H2><A NAME="SECTION00044000000000000000">
3983.4 How to tune logging with run-time directives</A>
399</H2>
400
401<P>
402
403<H3><A NAME="SECTION00044100000000000000">
4043.4.1 Instructing the module what to log</A>
405</H3>
406
407<P>
408The most basic directive for the module is L<SMALL>OG</SMALL>SQLT<SMALL>RANSFER</SMALL>L<SMALL>OG</SMALL>F<SMALL>ORMAT</SMALL>,
409which tells the module which information to send to the database;
410logging to the database will not take place without it. Place a L<SMALL>OG</SMALL>SQLT<SMALL>RANSFER</SMALL>L<SMALL>OG</SMALL>F<SMALL>ORMAT</SMALL>
411directive in the VirtualHost stanza of each virtual host that you
412want to activate.
413
414<P>
415After L<SMALL>OG</SMALL>SQLT<SMALL>RANSFER</SMALL>L<SMALL>OG</SMALL>F<SMALL>ORMAT</SMALL> you supply a string of characters
416that tell the module what information to log. In the configuration
417directive reference (section <A HREF="node4.html#sub:Frmat">3.6.17</A>) there is a table which
418clearly defines all the possible things to log. Let's say you want
419to log only the ``request time,'' the ``remote host,'' and
420the ``request''; you'd use:
421
422<P>
423
424<DL COMPACT>
425<DT>
426<DD>LogSQLTransferLogFormat&nbsp;hUS
427</DD>
428</DL>But a more appropriate string to use is
429
430<P>
431
432<DL COMPACT>
433<DT>
434<DD>LogSQLTransferLogFormat&nbsp;AbHhmRSsTUuv
435</DD>
436</DL>which logs all the information required to be compatible with the
437Combined Log Format (CLF).
438
439<P>
440If you don't choose to log everything that is available, that's fine.
441Fields in the unused columns in your table will simply contain NULL.
442
443<P>
444Some of the L<SMALL>OG</SMALL>SQLT<SMALL>RANSFER</SMALL>L<SMALL>OG</SMALL>F<SMALL>ORMAT</SMALL> characters require a
445little extra configuration:
446
447<P>
448
449<UL>
450<LI>If you specify 'c' to indicate that you want to log the cookie value,
451you must also tell the module which cookie you mean by using L<SMALL>OG</SMALL>SQLW<SMALL>HICH</SMALL>C<SMALL>OOKIE</SMALL>
452- after all, there could be many cookies associated with a given
453request. Fail to specify L<SMALL>OG</SMALL>SQLW<SMALL>HICH</SMALL>C<SMALL>OOKIE</SMALL>, and no cookie
454information at all will be logged.
455</LI>
456<LI>If you specify 'M' to indicate that you want to log the machine ID,
457you must also tell the module this machine's identity using the L<SMALL>OG</SMALL>SQLM<SMALL>ACHINE</SMALL>ID
458directive. Fail to specify L<SMALL>OG</SMALL>SQLM<SMALL>ACHINE</SMALL>ID, and a simple
459'-' character will be logged in the machine_id column.
460</LI>
461</UL>
462
463<P>
464
465<H3><A NAME="SECTION00044200000000000000"></A><A NAME="sub:Ignore"></A>
466<BR>
4673.4.2 Instructing the module what NOT to log using filtering
468directives
469</H3>
470
471<P>
472One ``accept'' and two ``ignore'' directives allow you to
473fine-tune what the module should not log. These are very handy for
474keeping your database as uncluttered as possible and keeping your
475statistics free of unneeded numbers. Think of each one as a gatekeeper.
476
477<P>
478<I>It is important to remember that each of these three directives
479is purely optional. mod_log_sql's default is to log everything. </I>
480
481<P>
482When a request comes in, the contents of L<SMALL>OG</SMALL>SQLR<SMALL>EQUEST</SMALL>A<SMALL>CCEPT</SMALL>
483are evaluated first. This optional, ``blanket'' directive lets
484you specify that only certain things are to be accepted for logging,
485and everything else discarded. Because it is evaluated before L<SMALL>OG</SMALL>SQLR<SMALL>EQUEST</SMALL>I<SMALL>GNORE</SMALL>
486and L<SMALL>OG</SMALL>SQLR<SMALL>EMHOST</SMALL>I<SMALL>GNORE</SMALL> it can halt logging before those
487two filtering directives ``get their chance.''
488
489<P>
490Once a request makes it past L<SMALL>OG</SMALL>SQLR<SMALL>EQUEST</SMALL>A<SMALL>CCEPT</SMALL>, it still
491can be excluded based on L<SMALL>OG</SMALL>SQLR<SMALL>EMHOST</SMALL>I<SMALL>GNORE</SMALL> and L<SMALL>OG</SMALL>SQLR<SMALL>EQUEST</SMALL>I<SMALL>GNORE</SMALL>.
492A good way to use L<SMALL>OG</SMALL>SQLR<SMALL>EMHOST</SMALL>I<SMALL>GNORE</SMALL> is to prevent the module
493from logging the traffic that your internal hosts generate. L<SMALL>OG</SMALL>SQLR<SMALL>EQUEST</SMALL>I<SMALL>GNORE</SMALL>
494is great for preventing things like requests for ``favicon.ico''
495from cluttering up your database, as well as excluding the various
496requests that worms make, etc.
497
498<P>
499You can specify a series of strings after each directive. Do not use
500any type of globbing or regular-expression syntax - each string is
501considered a match <I>if it is a substring of the larger request
502or remote-host; the comarison is case-sensitive.</I> This means that
503``L<SMALL>OG</SMALL>SQLR<SMALL>EMHOST</SMALL>I<SMALL>GNORE</SMALL> micro'' will ignore requests from
504``microsoft.com,'' ``microworld.net,'' ``mymicroscope.org,''
505etc. ``L<SMALL>OG</SMALL>SQLR<SMALL>EQUEST</SMALL>I<SMALL>GNORE</SMALL> gif'' will instruct the module
506to ignore requests for ``leftbar.gif,'' ``bluedot.gif'' and
507even ``giftwrap.jpg'' - but ``RED.GIF'' and ``Tree.Gif''
508would still get logged because of case sensitivity.
509
510<P>
511A summary of the decision flow:
512
513<P>
514
515<OL>
516<LI>If L<SMALL>OG</SMALL>SQLR<SMALL>EQUEST</SMALL>A<SMALL>CCEPT</SMALL> exists and a request does not match
517anything in that list, it is discarded.
518</LI>
519<LI>If a request matches anything in the L<SMALL>OG</SMALL>SQLR<SMALL>EQUEST</SMALL>I<SMALL>GNORE</SMALL>
520list, it is discarded.
521</LI>
522<LI>If a reqiest matches anything in the L<SMALL>OG</SMALL>SQLR<SMALL>EMHOST</SMALL>I<SMALL>GNORE</SMALL>
523list, it is discarded.
524</LI>
525<LI>Otherwise the request is logged.
526</LI>
527</OL>
528This means that you can have a series of directives similar to the
529following:
530
531<P>
532
533<DL COMPACT>
534<DT>
535<DD>LogSQLRequestAccept&nbsp;*.html&nbsp;*.gif&nbsp;*.jpg
536
537<P>
538LogSQLRequestIgnore&nbsp;statistics.html&nbsp;bluedot.jpg
539</DD>
540</DL>So the first line instructs the module to <B>only</B> log files
541with html, gif and jpg suffixes; requests for ``formail.cgi''
542and ``shopping-cart.pl'' will never be considered for logging.
543(``LeftArrow.JPG'' will also never be considered for logging -
544remember, the comparison is <B>case sensitive</B>.) The second line
545prunes the list further - you never want to log requests for those
546two objects.
547
548<P>
549Tip: if you want to match all the hosts in your domain such as ``host1.corp.foo.com''
550and ``server.dmz.foo.com'', simply specify:
551
552<P>
553
554<DL COMPACT>
555<DT>
556<DD>LogSQLRemhostIgnore&nbsp;foo.com
557</DD>
558</DL>Tip: a great way to catch the vast majority of worm-attack requests
559and prevent them from being logged is to specify:
560
561<P>
562
563<DL COMPACT>
564<DT>
565<DD>LogSQLRequestIgnore&nbsp;root.exe&nbsp;cmd.exe&nbsp;default.ida
566</DD>
567</DL>Tip: to prevent the logging of requests for common graphic types,
568make sure to put a '.' before the suffix to avoid matches that you
569didn't intend:
570
571<P>
572
573<DL COMPACT>
574<DT>
575<DD>LogSQLRequestIgnore&nbsp;.gif&nbsp;.jpg
576</DD>
577</DL>
578<P>
579
580<H2><A NAME="SECTION00045000000000000000">
5813.5 Advanced logging scenarios</A>
582</H2>
583
584<P>
585
586<H3><A NAME="SECTION00045100000000000000">
5873.5.1 Using the module in an ISP environment</A>
588</H3>
589
590<P>
591mod_log_sql has three basic tiers of operation:
592
593<P>
594
595<OL>
596<LI>The administrator creates all necessary tables by hand and configures
597each Apache VirtualHost by hand. (L<SMALL>OG</SMALL>SQLC<SMALL>REATE</SMALL>T<SMALL>ABLES </SMALL>O<SMALL>FF</SMALL>)
598</LI>
599<LI>The module is permitted to create necessary tables on-the-fly, but
600the administrator configures each Apache VirtualHost by hand. (L<SMALL>OG</SMALL>SQLC<SMALL>REATE</SMALL>T<SMALL>ABLES
601</SMALL>O<SMALL>N</SMALL>)
602</LI>
603<LI>The module is permitted to create all necessary tables and to make
604intelligent, on-the-fly configuration of each VirtualHost. (L<SMALL>OG</SMALL>SQLM<SMALL>ASS</SMALL>V<SMALL>IRTUAL</SMALL>H<SMALL>OSTING
605</SMALL>O<SMALL>N</SMALL>)
606</LI>
607</OL>
608Many users are happy to use the module in its most minimal form: they
609hand-create any necessary tables (using ``create_tables.sql''),
610and they configure each VirtualHost by hand to suit their needs. However,
611some administrators need extra features due to a large and growing
612number of VirtualHosts. The L<SMALL>OG</SMALL>SQLM<SMALL>ASS</SMALL>V<SMALL>IRTUAL</SMALL>H<SMALL>OSTING</SMALL> directive
613activates module capabilities that make it far easier to manage an
614ISP environment, or any situation characterized by a large and varying
615number of virtual servers:
616
617<P>
618
619<UL>
620<LI>the on-the-fly table creation feature is activated automatically
621</LI>
622<LI>the transfer log table name is dynamically set from the virtual host's
623name (example: a virtual host ``www.grubbybaby.com'' gets logged
624to table ``access_www_grubbybaby_com'')
625</LI>
626</UL>
627There are numerous benefits. The admin will not need to create new
628tables for every new VirtualHost. (Although the admin will still need
629to drop the tables of virtual hosts that are removed.) The admin will
630not need to set L<SMALL>OG</SMALL>SQLT<SMALL>RANSFER</SMALL>L<SMALL>OG</SMALL>T<SMALL>ABLE</SMALL> for each virtual host
631- it will be configured automatically based on the host's name. Because
632each virtual host will log to its own segregated table, data about
633one virtual server will segregate from others; an admin can grant
634users access to the tables they need, and they will be unable to view
635data about another user's virtual host.
636
637<P>
638In an ISP scenario the admin is likely to have a cluster of many front-end
639webservers logging to a back-end database. mod_log_sql has a feature
640that permits analysis of how well the web servers are loadbalancing:
641the L<SMALL>OG</SMALL>SQLM<SMALL>ACHINE</SMALL>ID directive. The administrator uses this
642directive to assign a unique identifier to each machine in the web
643cluster, e.g. ``L<SMALL>OG</SMALL>SQLM<SMALL>ACHINE</SMALL>ID web01,'' ``L<SMALL>OG</SMALL>SQLM<SMALL>ACHINE</SMALL>ID
644web02,'' etc. Used in conjunction with the 'M' character in L<SMALL>OG</SMALL>SQLT<SMALL>RANSFER</SMALL>L<SMALL>OG</SMALL>F<SMALL>ORMAT</SMALL>,
645each entry in the SQL log will include the machine ID of the machine
646that created the entry. This permits the administrator to count the
647entries made by each particular machine and thereby analyze the front-end
648loadbalancing algorithm.
649
650<P>
651
652<H3><A NAME="SECTION00045200000000000000"></A><A NAME="secMulTable"></A>
653<BR>
6543.5.2 Logging many-to-one data in separate tables
655</H3>
656
657<P>
658A given HTTP request can have a one-to-many relationship with certain
659kinds of data. For example, a single HTTP request can have 4 cookies,
6603 headers and 5 ``mod_gzip'' notes associated with it. mod_log_sql
661is capable of logging these relationships due to the elegance of SQL
662relational data.
663
664<P>
665You already have a single table containing access requests. One of
666the columns in that table is 'id' which is intended to contain the
667unique request ID supplied by the standard Apache module mod_unique_id
668- all you need to do is compile in that module and employ the L<SMALL>OG</SMALL>SQLT<SMALL>RANSFER</SMALL>L<SMALL>OG</SMALL>F<SMALL>ORMAT</SMALL>
669character 'I'. Thereafter, each request gets a unique ID that can
670be thought of as a primary key within the database, useful for joining
671multiple tables. So let's envision several new tables: a notes table,
672a cookies table, and a table for inbound and outbound headers.
673
674<P>
675<BR><P></P>
676<DIV ALIGN="CENTER">
677
678<P>
679
680<P>
681<DIV ALIGN="CENTER">
682<A NAME="958"></A>
683<TABLE CELLPADDING=3 BORDER="1">
684<CAPTION><STRONG>Table 1:</STRONG>
685access_log</CAPTION>
686<TR><TD ALIGN="LEFT">id</TD>
687<TD ALIGN="LEFT">remote_host</TD>
688<TD ALIGN="LEFT">request_uri</TD>
689<TD ALIGN="LEFT">time_stamp</TD>
690<TD ALIGN="LEFT">status</TD>
691<TD ALIGN="LEFT">bytes_sent</TD>
692</TR>
693<TR><TD ALIGN="LEFT">PPIDskBRH30AAGPtAsg</TD>
694<TD ALIGN="LEFT">zerberus.aiacs.net</TD>
695<TD ALIGN="LEFT">/mod_log_sql/index.html</TD>
696<TD ALIGN="LEFT">1022493617</TD>
697<TD ALIGN="LEFT">200</TD>
698<TD ALIGN="LEFT">2215</TD>
699</TR>
700</TABLE>
701</DIV>
702</DIV>
703<BR>
704<BR><P></P>
705<DIV ALIGN="CENTER">
706
707<P>
708
709<P>
710<DIV ALIGN="CENTER">
711<A NAME="959"></A>
712<TABLE CELLPADDING=3 BORDER="1">
713<CAPTION><STRONG>Table 2:</STRONG>
714notes_log</CAPTION>
715<TR><TD ALIGN="LEFT">id</TD>
716<TD ALIGN="LEFT">item</TD>
717<TD ALIGN="LEFT">val</TD>
718</TR>
719<TR><TD ALIGN="LEFT">PPIDskBRH30AAGPtAsg</TD>
720<TD ALIGN="LEFT">mod_gzip_result</TD>
721<TD ALIGN="LEFT">OK</TD>
722</TR>
723<TR><TD ALIGN="LEFT">PPIDskBRH30AAGPtAsg</TD>
724<TD ALIGN="LEFT">mod_gzip_compression_ratio</TD>
725<TD ALIGN="LEFT">69</TD>
726</TR>
727</TABLE>
728</DIV>
729</DIV>
730<BR>
731
732<P>
733<BR><P></P>
734<DIV ALIGN="CENTER">
735
736<P>
737
738<P>
739<DIV ALIGN="CENTER">
740<A NAME="960"></A>
741<TABLE CELLPADDING=3 BORDER="1">
742<CAPTION><STRONG>Table 3:</STRONG>
743headers_log</CAPTION>
744<TR><TD ALIGN="LEFT">id</TD>
745<TD ALIGN="LEFT">item</TD>
746<TD ALIGN="LEFT">val</TD>
747</TR>
748<TR><TD ALIGN="LEFT">PPIDskBRH30AAGPtAsg</TD>
749<TD ALIGN="LEFT">Content-Type</TD>
750<TD ALIGN="LEFT">text/html</TD>
751</TR>
752<TR><TD ALIGN="LEFT">PPIDskBRH30AAGPtAsg</TD>
753<TD ALIGN="LEFT">Accept-Encoding</TD>
754<TD ALIGN="LEFT">gzip, deflate</TD>
755</TR>
756<TR><TD ALIGN="LEFT">PPIDskBRH30AAGPtAsg</TD>
757<TD ALIGN="LEFT">Expires</TD>
758<TD ALIGN="LEFT">Tue, 28 May 2002 10:00:18 GMT</TD>
759</TR>
760<TR><TD ALIGN="LEFT">PPIDskBRH30AAGPtAsg</TD>
761<TD ALIGN="LEFT">Cache-Control</TD>
762<TD ALIGN="LEFT">max-age=86400</TD>
763</TR>
764</TABLE>
765</DIV>
766</DIV>
767<BR>
768
769<P>
770We have a certain request, and its unique ID is ``PPIDskBRH30AAGPtAsg''.
771Within each separate table will be multiple entries with that request
772ID: several cookie entries, several header entries, etc. As you can
773see in tables <A HREF="#tblAcc">1</A>, <A HREF="#tblNotes">2</A> and <A HREF="#tblHdr">3</A>, you
774have a one-to-many relationship for request PPIDskBRH30AAGPtAsg: that
775one access has two associated notes and four associated headers. You
776can extract this data easily using the power of SQL's ``select''
777statement and table joins. To see the notes associated with a particular
778request:
779
780<P>
781
782<DL COMPACT>
783<DT>
784<DD>select&nbsp;a.remote_host,&nbsp;a.request_uri,&nbsp;n.item,&nbsp;n.val&nbsp;from&nbsp;access_log&nbsp;a,&nbsp;notes_log&nbsp;n
785
786<P>
787where&nbsp;a.id=n.id&nbsp;and&nbsp;a.id='PPIDskBRH30AAGPtAsg';
788
789<P>
790</DD>
791</DL>
792<DIV ALIGN="CENTER">
793<TABLE CELLPADDING=3 BORDER="1">
794<TR><TD ALIGN="LEFT">remote_host</TD>
795<TD ALIGN="LEFT">request_uri</TD>
796<TD ALIGN="LEFT">item</TD>
797<TD ALIGN="LEFT">val</TD>
798</TR>
799<TR><TD ALIGN="LEFT">zerberus.aiacs.net</TD>
800<TD ALIGN="LEFT">/mod_log_sql/index.html</TD>
801<TD ALIGN="LEFT">mod_gzip_result</TD>
802<TD ALIGN="LEFT">OK</TD>
803</TR>
804<TR><TD ALIGN="LEFT">zerberus.aiacs.net</TD>
805<TD ALIGN="LEFT">/mod_log_sql/index.html</TD>
806<TD ALIGN="LEFT">mod_gzip_compression_ratio</TD>
807<TD ALIGN="LEFT">69</TD>
808</TR>
809</TABLE>
810</DIV>
811
812<P>
813
814<DL COMPACT>
815<DT>
816<DD><P>
817</DD>
818</DL>Naturally you can craft similar statements for the outboud headers,
819inbound headers and cookies, all of which can live in separate tables.
820Your statements are limited in power only by your skill with SQL.
821
822<P>
823In order to use this capability of mod_log_sql, you must do several
824things:
825
826<P>
827
828<UL>
829<LI>Compile mod_unique_id into Apache (statically or as a DSO). mod_log_sql
830employs the unique request ID that mod_unique_id provides in order
831to key between the separate tables. You can still log the data without
832mod_unqiue_id, but it will be completely uncorrelated and you will
833have no way to discern any meaning.
834</LI>
835<LI>Create the appropriate tables. This will be done for you if you permit
836mod_log_sql to create its own tables using L<SMALL>OG</SMALL>SQLC<SMALL>REATE</SMALL>T<SMALL>ABLES
837</SMALL>O<SMALL>N</SMALL>, or if you use the enclosed ``create_tables.sql'' script.
838</LI>
839<LI>Create a SQL index on the ``id'' column. Without this index, table
840joins will be deathly slow. I recommend you consult the MySQL documentation
841on the proper way to create a column index if you are not familiar
842with this operation.
843</LI>
844<LI>Within each appropriate VirtualHost stanza, use the L<SMALL>OG</SMALL>SQLW<SMALL>HICH</SMALL>*
845and L<SMALL>OG</SMALL>SQL*L<SMALL>OG</SMALL>T<SMALL>ABLE</SMALL> directives to tell the module what
846and where to log the data. In the following example, I have overridden
847the name for the notes table whereas I have left the other table names
848at their defaults. I have then specified the cookies, headers and
849notes that interest me. (And as you can see, these directives do not
850require me to add any characters to L<SMALL>OG</SMALL>SQLT<SMALL>RANSFER</SMALL>L<SMALL>OG</SMALL>T<SMALL>ABLE.)</SMALL>
851</LI>
852</UL>
853
854<DL COMPACT>
855<DT>
856<DD>&lt;VirtualHost&nbsp;216.231.36.128&gt;
857
858<P>
859&nbsp;&nbsp;(snip)
860
861<P>
862&nbsp;&nbsp;LogSQLNotesLogTable&nbsp;notestable
863
864<P>
865&nbsp;&nbsp;LogSQLWhichCookies&nbsp;bluecookie&nbsp;redcookie&nbsp;greencookie&nbsp;
866
867<P>
868&nbsp;&nbsp;LogSQLWhichNotes&nbsp;mod_gzip_result&nbsp;mod_gzip_compression_ratio
869
870<P>
871&nbsp;&nbsp;LogSQLWhichHeadersOut&nbsp;Expires&nbsp;Content-Type&nbsp;Cache-Control&nbsp;
872
873<P>
874&nbsp;&nbsp;LogSQLWhichHeadersIn&nbsp;UserAgent&nbsp;Accept-Encoding&nbsp;Host
875
876<P>
877&nbsp;&nbsp;(snip)
878
879<P>
880&lt;/VirtualHost&gt;
881</DD>
882</DL>
883<P>
884
885<H3><A NAME="SECTION00045300000000000000">
8863.5.3 Using the same database for production and test</A>
887</H3>
888
889<P>
890Although suboptimal, it is not uncommon to use the same backend database
891for the ``production'' webservers as well as the ``test''
892webservers (budgetary constraints, rackspace limits, etc.). Furthermore,
893an administrator in this situation may be unable to use L<SMALL>OG</SMALL>SQLR<SMALL>EMHOST</SMALL>I<SMALL>GNORE</SMALL>
894to exclude requests from the test servers - perhaps the generated
895entries are genuinely useful for analytical or QA purposes, but their
896value after analysis is minimal.
897
898<P>
899It is wasteful and potentially confusing to permit this internal test
900data to clutter the database, and a solution to the problem is the
901proper use of the L<SMALL>OG</SMALL>SQLM<SMALL>ACHINE</SMALL>ID directive. Assume a scenario
902where the production webservers have IDs like ``web01,'' ``web02,''
903and so on - and the test webservers have IDs like ``test01,''
904``test02,'' etc. Because entries in the log database are distinguished
905by their source machine, an administrator may purge unneeded test
906data from the access log as follows:
907
908<P>
909
910<DL COMPACT>
911<DT>
912<DD>delete&nbsp;from&nbsp;access_log&nbsp;where&nbsp;machine_id&nbsp;like&nbsp;'test%';
913</DD>
914</DL>
915<P>
916
917<H3><A NAME="SECTION00045400000000000000"></A><A NAME="sub:DelayedIns"></A>
918<BR>
9193.5.4 Optimizing for a busy database
920</H3>
921
922<P>
923A busy MySQL database will have SELECT statements running concurrently
924with INSERT and UPDATE statements. A long-running SELECT can in certain
925circumstances block INSERTs and therefore block mod_log_sql. A workaround
926is to compile mod_log_sql for ``delayed inserts,'' which are
927described as follows in the MySQL documentation:
928
929<P>
930<BLOCKQUOTE>
931The DELAYED option for the INSERT statement is a MySQL-specific option
932that is very useful if you have clients that can't wait for the INSERT
933to complete. This is a common problem when you use MySQL for logging
934and you also periodically run SELECT and UPDATE statements that take
935a long time to complete. DELAYED was introduced in MySQL Version 3.22.15.
936It is a MySQL extension to ANSI SQL92.
937</BLOCKQUOTE>
938<P>
939<BLOCKQUOTE>INSERT DELAYED only works with ISAM and MyISAM tables. Note that as
940MyISAM tables supports concurrent SELECT and INSERT, if there is no
941free blocks in the middle of the data file, you very seldom need to
942use INSERT DELAYED with MyISAM.
943</BLOCKQUOTE>
944<P>
945<BLOCKQUOTE>When you use INSERT DELAYED, the client will get an OK at once and
946the row will be inserted when the table is not in use by any other
947thread.
948</BLOCKQUOTE>
949<P>
950<BLOCKQUOTE>Another major benefit of using INSERT DELAYED is that inserts from
951many clients are bundled together and written in one block. This is
952much faster than doing many separate inserts.
953
954</BLOCKQUOTE>
955The general disadvantages of delayed inserts are:
956
957<P>
958
959<OL>
960<LI>The queued rows are only stored in memory until they are inserted
961into the table. If mysqld dies unexpectedly, any queued rows that
962weren't written to disk are lost.
963</LI>
964<LI>There is additional overhead for the server to handle a separate thread
965for each table on which you use INSERT DELAYED.
966</LI>
967</OL>
968<B>The MySQL documentation concludes, ``This means that you
969should only use INSERT DELAYED when you are really sure you need it!''
970Furthermore, the current state of error return from a failed INSERT
971DELAYED seems to be in flux, and may behave in unpredictable ways
972between different MySQL versions. See section <A HREF="node5.html#sub:DelayedInsFAQ">4.3.4</A>
973in the FAQ - you have been warned.</B>
974
975<P>
976If you are experiencing issues which could be solved by delayed inserts,
977uncomment the #MYSQLDELAYED line in the Makefile by removing the
978# that is in front of it. Recompile and reinstall your module. All
979regular INSERT statements are now INSERT DELAYED, and you should see
980no more blocking of the module.
981
982<P>
983
984<H2><A NAME="SECTION00046000000000000000"></A><A NAME="sec:ConfRef"></A>
985<BR>
9863.6 Configuration directive reference
987</H2>
988
989<P>
990It is imperative that you understand which directives are used <I>only
991once</I> in the main server config, and which are used inside VirtualHost
992stanzas and therefore multiple times within httpd.conf. The ``context''
993listed with each entry informs you of this.
994
995<P>
996
997<H3><A NAME="SECTION00046100000000000000">
9983.6.1 LogSQLCookieLogTable</A>
999</H3>
1000
1001<P>
1002
1003<DL COMPACT>
1004<DT>
1005<DD>Syntax:&nbsp;LogSQLCookieLogTable&nbsp;table-name&nbsp;
1006
1007<P>
1008Example:&nbsp;LogSQLCookieLogTable&nbsp;cookie_log
1009
1010<P>
1011Default:&nbsp;cookies
1012
1013<P>
1014Context:&nbsp;virtual&nbsp;host
1015</DD>
1016</DL>Defines which table is used for logging of cookies. Working in conjunction
1017with L<SMALL>OG</SMALL>SQLW<SMALL>HICH</SMALL>C<SMALL>OOKIES</SMALL>, you can log many of each request's
1018associated cookies to a separate table. For meaningful data retrieval
1019the cookie table is keyed to the access table by the unique request
1020ID supplied by the standard Apache module mod_unique_id.
1021
1022<P>
1023Note that you must create the table (see create-tables.sql, included
1024in the package), or L<SMALL>OG</SMALL>SQLC<SMALL>REATE</SMALL>T<SMALL>ABLES</SMALL> must be set to ``on''.
1025
1026<P>
1027
1028<H3><A NAME="SECTION00046200000000000000">
10293.6.2 LogSQLCreateTables</A>
1030</H3>
1031
1032<P>
1033
1034<DL COMPACT>
1035<DT>
1036<DD>Syntax:&nbsp;LogSQLCreateTables&nbsp;flag
1037
1038<P>
1039Example:&nbsp;LogSQLCreateTables&nbsp;On&nbsp;
1040
1041<P>
1042Default:&nbsp;Off&nbsp;
1043
1044<P>
1045Context:&nbsp;main&nbsp;server&nbsp;config
1046</DD>
1047</DL>mod_log_sql has the ability to create its tables on-the-fly. The
1048advantage to this is convenience: you don't have to execute any SQL
1049by hand to prepare the table. This is especially helpful for people
1050with lots of virtual hosts (who should also see the L<SMALL>OG</SMALL>SQLM<SMALL>ASS</SMALL>V<SMALL>IRTUAL</SMALL>H<SMALL>OSTING</SMALL>
1051directive).
1052
1053<P>
1054There is a slight disadvantage: if you wish to activate this feature,
1055then the userid specified in L<SMALL>OG</SMALL>SQLL<SMALL>OGIN</SMALL>I<SMALL>NFO</SMALL> must have CREATE
1056privileges on the database. In an absolutely paranoid, locked-down
1057situation you may only want to grant your mod_log_sql user INSERT
1058privileges on the database; in that situation you are unable to take
1059advantage of L<SMALL>OG</SMALL>SQLC<SMALL>REATE</SMALL>T<SMALL>ABLES</SMALL>. But most people - even
1060the very security-conscious - will find that granting CREATE on the
1061logging database is reasonable.
1062
1063<P>
1064This is defined only once in the httpd.conf file.
1065
1066<P>
1067
1068<H3><A NAME="SECTION00046300000000000000">
10693.6.3 LogSQLDatabase </A>
1070</H3>
1071
1072<P>
1073
1074<DL COMPACT>
1075<DT>
1076<DD><B>MANDATORY</B>
1077
1078<P>
1079Syntax:&nbsp;LogSQLDatabase&nbsp;database&nbsp;
1080
1081<P>
1082Example:&nbsp;LogSQLDatabase&nbsp;loggingdb&nbsp;
1083
1084<P>
1085Context:&nbsp;main&nbsp;server&nbsp;config
1086</DD>
1087</DL>Defines the database that is used for logging. ``database'' must
1088be a valid db on the MySQL host defined in L<SMALL>OG</SMALL>SQLL<SMALL>OGIN</SMALL>I<SMALL>NFO</SMALL>.
1089
1090<P>
1091This is defined only once in the httpd.conf file.
1092
1093<P>
1094
1095<H3><A NAME="SECTION00046400000000000000">
10963.6.4 LogSQLForcePreserve</A>
1097</H3>
1098
1099<P>
1100
1101<DL COMPACT>
1102<DT>
1103<DD>Syntax:&nbsp;LogSQLForcePreserve&nbsp;Flag
1104
1105<P>
1106Example:&nbsp;LogSQLPreserveFile&nbsp;on
1107
1108<P>
1109Default:&nbsp;off
1110
1111<P>
1112Context:&nbsp;main&nbsp;server&nbsp;config
1113</DD>
1114</DL>You may need to perform debugging on your database and specifically
1115want mod_log_sql to make no attempts to log to it. This directive
1116instructs the module to send all its log entries directly to the preserve
1117file and to make no database INSERT attempts.
1118
1119<P>
1120This is presumably a directive for temporary use only; it could be
1121dangerous if you set it and forget it, as all your entries will simply
1122pile up in the preserve file.
1123
1124<P>
1125This is defined only once in the httpd.conf file.
1126
1127<P>
1128
1129<H3><A NAME="SECTION00046500000000000000">
11303.6.5 LogSQLHeadersInLogTable</A>
1131</H3>
1132
1133<P>
1134
1135<DL COMPACT>
1136<DT>
1137<DD>Syntax:&nbsp;LogSQLHeadersInLogTable&nbsp;table-name&nbsp;
1138
1139<P>
1140Example:&nbsp;LogSQLHeadersInLogTable&nbsp;headers
1141
1142<P>
1143Default:&nbsp;headers_in
1144
1145<P>
1146Context:&nbsp;virtual&nbsp;host
1147</DD>
1148</DL>Defines which table is used for logging of inbound headers. Working
1149in conjunction with L<SMALL>OG</SMALL>SQLW<SMALL>HICH</SMALL>H<SMALL>EADERS</SMALL>I<SMALL>N</SMALL>, you can log many
1150of each request's associated headers to a separate table. For meaningful
1151data retrieval the headers table is keyed to the access table by the
1152unique request ID supplied by the standard Apache module mod_unique_id.
1153
1154<P>
1155Note that you must create the table (see create-tables.sql, included
1156in the package), or L<SMALL>OG</SMALL>SQLC<SMALL>REATE</SMALL>T<SMALL>ABLES</SMALL> must be set to ``on''.
1157
1158<P>
1159
1160<H3><A NAME="SECTION00046600000000000000">
11613.6.6 LogSQLHeadersOutLogTable</A>
1162</H3>
1163
1164<P>
1165
1166<DL COMPACT>
1167<DT>
1168<DD>Syntax:&nbsp;LogSQLHeadersOutLogTable&nbsp;table-name&nbsp;
1169
1170<P>
1171Example:&nbsp;LogSQLHeadersOutLogTable&nbsp;headers
1172
1173<P>
1174Default:&nbsp;headers_out
1175
1176<P>
1177Context:&nbsp;virtual&nbsp;host
1178</DD>
1179</DL>Defines which table is used for logging of outbound headers. Working
1180in conjunction with L<SMALL>OG</SMALL>SQLW<SMALL>HICH</SMALL>H<SMALL>EADERS</SMALL>O<SMALL>UT</SMALL>, you can log many
1181of each request's associated headers to a separate table. For meaningful
1182data retrieval the headers table is keyed to the access table by the
1183unique request ID supplied by the standard Apache module mod_unique_id.
1184
1185<P>
1186Note that you must create the table (see create-tables.sql, included
1187in the package), or L<SMALL>OG</SMALL>SQLC<SMALL>REATE</SMALL>T<SMALL>ABLES</SMALL> must be set to ``on''.
1188
1189<P>
1190
1191<H3><A NAME="SECTION00046700000000000000">
11923.6.7 LogSQLLoginInfo </A>
1193</H3>
1194
1195<P>
1196
1197<DL COMPACT>
1198<DT>
1199<DD><B>MANDATORY</B>&nbsp;
1200
1201<P>
1202Syntax:&nbsp;LogSQLLoginInfo&nbsp;host&nbsp;user&nbsp;password
1203
1204<P>
1205Example:&nbsp;LogSQLLoginInfo&nbsp;foobar.baz.com&nbsp;logwriter&nbsp;passw0rd&nbsp;
1206
1207<P>
1208Context:&nbsp;main&nbsp;server&nbsp;config
1209</DD>
1210</DL>Defines the general parameters of the MySQL host to which you will
1211be logging. ``host'' is the hostname or IP address of the MySQL
1212machine, and is simply ``localhost'' if the database lives on
1213the same machine as Apache. ``user'' is the MySQL userid (not
1214a Unix userid!) with INSERT privileges on the table defined in L<SMALL>OG</SMALL>SQLT<SMALL>RANSFER</SMALL>L<SMALL>OG</SMALL>T<SMALL>ABLE</SMALL>.
1215``password'' is that user's password.
1216
1217<P>
1218This is defined only once in the httpd.conf file.
1219
1220<P>
1221
1222<H3><A NAME="SECTION00046800000000000000">
12233.6.8 LogSQLMachineID</A>
1224</H3>
1225
1226<P>
1227
1228<DL COMPACT>
1229<DT>
1230<DD>Syntax:&nbsp;LogSQLMachineID&nbsp;somename
1231
1232<P>
1233Example:&nbsp;LogSQLMachineID&nbsp;web01
1234
1235<P>
1236Context:&nbsp;main&nbsp;server&nbsp;config
1237</DD>
1238</DL>If you have a farm of webservers then you may wish to know which particular
1239machine made each entry; this is useful for analyzing your loadbalancing
1240methodology. L<SMALL>OG</SMALL>SQLM<SMALL>ACHINE</SMALL>ID permits you to distinguish each
1241machine's entries if you assign each machine its own L<SMALL>OG</SMALL>SQLM<SMALL>ACHINE</SMALL>ID:
1242for example, the first webserver gets ``L<SMALL>OG</SMALL>SQLM<SMALL>ACHINE</SMALL>ID
1243web01,'' the second gets ``L<SMALL>OG</SMALL>SQLM<SMALL>ACHINE</SMALL>ID web02,''
1244etc.
1245
1246<P>
1247This is defined only once in the httpd.conf file.
1248
1249<P>
1250
1251<H3><A NAME="SECTION00046900000000000000">
12523.6.9 LogSQLMassVirtualHosting</A>
1253</H3>
1254
1255<P>
1256
1257<DL COMPACT>
1258<DT>
1259<DD>Syntax:&nbsp;LogSQLMassVirtualHosting&nbsp;flag&nbsp;
1260
1261<P>
1262Example:&nbsp;LogSQLMassVirtualHosting&nbsp;On&nbsp;
1263
1264<P>
1265Default:&nbsp;Off&nbsp;
1266
1267<P>
1268Context:&nbsp;main&nbsp;server&nbsp;config
1269</DD>
1270</DL>If you administer a site hosting many, many virtual hosts then this
1271option will appeal to you. If you turn on L<SMALL>OG</SMALL>SQLM<SMALL>ASS</SMALL>V<SMALL>IRTUAL</SMALL>H<SMALL>OSTING</SMALL>
1272then several things happen:
1273
1274<P>
1275
1276<UL>
1277<LI>the on-the-fly table creation feature is activated automatically
1278</LI>
1279<LI>the transfer log table name is dynamically set from the virtual host's
1280name after stripping out SQL-unfriendly characters (example: a virtual
1281host www.grubbybaby.com gets logged to table access_www_grubbybaby_com)
1282</LI>
1283<LI>which, in turn, means that each virtual host logs to its own segregated
1284table. Because there is no data shared between virtual servers you
1285can grant your users access to the tables they need; they will be
1286unable to view others' data.
1287</LI>
1288</UL>
1289This is a huge boost in convenience for sites with many virtual servers.
1290Activating L<SMALL>OG</SMALL>SQLM<SMALL>ASS</SMALL>V<SMALL>IRTUAL</SMALL>H<SMALL>OSTING</SMALL> obviates the need to
1291create every virtual server's table and provides more granular security
1292possibilities.
1293
1294<P>
1295You are advised to investigate the use of Apache's U<SMALL>SE</SMALL>C<SMALL>ANONICAL</SMALL>N<SMALL>AME
1296</SMALL>O<SMALL>N</SMALL> directive with this directive in order to ensure that each virtual
1297host maps to one table namespace.
1298
1299<P>
1300This is defined only once in the httpd.conf file.
1301
1302<P>
1303
1304<H3><A NAME="SECTION000461000000000000000">
13053.6.10 LogSQLNotesLogTable</A>
1306</H3>
1307
1308<P>
1309
1310<DL COMPACT>
1311<DT>
1312<DD>Syntax:&nbsp;LogSQLNotesLogTable&nbsp;table-name&nbsp;
1313
1314<P>
1315Example:&nbsp;LogSQLNotesLogTable&nbsp;notes_log
1316
1317<P>
1318Default:&nbsp;notes
1319
1320<P>
1321Context:&nbsp;virtual&nbsp;host&nbsp;
1322</DD>
1323</DL>Defines which table is used for logging of notes. Working in conjunction
1324with L<SMALL>OG</SMALL>SQLW<SMALL>HICH</SMALL>N<SMALL>OTES</SMALL>, you can log many of each request's
1325associated notes to a separate table. For meaningful data retrieval
1326the notes table is keyed to the access table by the unique request
1327ID supplied by the standard Apache module mod_unique_id.
1328
1329<P>
1330Note that you must create the table (see create-tables.sql, included
1331in the package), or L<SMALL>OG</SMALL>SQLC<SMALL>REATE</SMALL>T<SMALL>ABLES</SMALL> must be set to ``on''.
1332
1333<P>
1334
1335<H3><A NAME="SECTION000461100000000000000">
13363.6.11 LogSQLPreserveFile</A>
1337</H3>
1338
1339<P>
1340
1341<DL COMPACT>
1342<DT>
1343<DD>Syntax:&nbsp;LogSQLPreserveFile&nbsp;filename&nbsp;
1344
1345<P>
1346Example:&nbsp;LogSQLPreserveFile&nbsp;offline-preserve&nbsp;
1347
1348<P>
1349Default:&nbsp;/tmp/sql-preserve
1350
1351<P>
1352Context:&nbsp;virtual&nbsp;host
1353</DD>
1354</DL>mod_log_sql writes queries to this local preserve file in the event
1355that it cannot reach the database, and thus ensures that your high-availability
1356web frontend does not lose logs during a temporary database outage.
1357This could happen for a number of reasons: the database goes offline,
1358the network breaks, etc. You will not lose entries since the module
1359has this backup. The file consists of a series of SQL statements that
1360can be imported into your database at your convenience; furthermore,
1361because the SQL queries contain the access timestamps you do not need
1362to worry about out-of-order data after the import, which is done in
1363a simple manner:
1364
1365<P>
1366
1367<DL COMPACT>
1368<DT>
1369<DD>#&nbsp;mysql&nbsp;-uadminuser&nbsp;-p&nbsp;mydbname&nbsp;&lt;&nbsp;/tmp/sql-preserve
1370</DD>
1371</DL>If you do not define L<SMALL>OG</SMALL>SQLP<SMALL>RESERVE</SMALL>F<SMALL>ILE</SMALL> then all virtual
1372servers will log to the same default preserve file (/tmp/sql-preserve).
1373You can redefine this on a virtual-host basis in order to segregate
1374your preserve files if you desire. Note that segregation is not usually
1375necessary, as the SQL statements that are written to the preserve
1376file already distinguish between different virtual hosts if you include
1377the 'v' character in your L<SMALL>OG</SMALL>SQLT<SMALL>RANSFER</SMALL>L<SMALL>OG</SMALL>F<SMALL>ORMAT</SMALL> directive.
1378It is only necessary to segregate preserve-files by virualhost if
1379you also segregate access logs by virtualhost.
1380
1381<P>
1382The module will log to Apache's E<SMALL>RROR</SMALL>L<SMALL>OG</SMALL> when it notices
1383a database outage, and upon database return. You will therefore know
1384when the preserve file is being used, although it is your responsibility
1385to import the file.
1386
1387<P>
1388The file does not need to be created in advance. It is safe to remove
1389or rename the file without interrupting Apache, as the module closes
1390the filehandle immediately after completing the write. The file is
1391created with the user &amp; group ID of the running Apache process (e.g.
1392'nobody' on many Linux distributions).
1393
1394<P>
1395
1396<H3><A NAME="SECTION000461200000000000000">
13973.6.12 LogSQLRemhostIgnore</A>
1398</H3>
1399
1400<P>
1401
1402<DL COMPACT>
1403<DT>
1404<DD>Syntax:&nbsp;LogSQLRemhostIgnore&nbsp;host1&nbsp;host2&nbsp;host3&nbsp;...&nbsp;hostN&nbsp;
1405
1406<P>
1407Example:&nbsp;LogSQLRemhostIgnore&nbsp;localnet.com&nbsp;
1408
1409<P>
1410Context:&nbsp;virtual&nbsp;host
1411</DD>
1412</DL>Lists a series of strings that, if present in the REMOTE_HOST, will
1413cause that request to <B>not</B> be logged. This directive is useful
1414for cutting down on log clutter when you are certain that you want
1415to ignore requests from certain hosts, such as your own internal network
1416machines. See section <A HREF="node4.html#sub:Ignore">3.4.2</A> for some tips for using this
1417directive.
1418
1419<P>
1420Each string is separated by a space, and no regular expressions or
1421globbing are allowed. Each string is evaluated as a substring of the
1422REMOTE_HOST using strstr(). The comparison is case sensitive.
1423
1424<P>
1425
1426<H3><A NAME="SECTION000461300000000000000">
14273.6.13 LogSQLRequestAccept</A>
1428</H3>
1429
1430<P>
1431
1432<DL COMPACT>
1433<DT>
1434<DD>Syntax:&nbsp;LogSQLRequestAccept&nbsp;req1&nbsp;req2&nbsp;req3&nbsp;...&nbsp;reqN&nbsp;
1435
1436<P>
1437Example:&nbsp;LogSQLRequestAccept&nbsp;.html&nbsp;.php&nbsp;.jpg
1438
1439<P>
1440Default:&nbsp;if&nbsp;not&nbsp;specified,&nbsp;all&nbsp;requests&nbsp;are&nbsp;``accepted''
1441
1442<P>
1443Context:&nbsp;virtual&nbsp;host
1444</DD>
1445</DL>Lists a series of strings that, if present in the URI, will permit
1446that request to be considered for logging (depending on additional
1447filtering by the ``ignore'' directives). Any request that fails
1448to match one of the L<SMALL>OG</SMALL>SQLR<SMALL>EQUEST</SMALL>A<SMALL>CCEPT</SMALL> entries will be discarded.
1449
1450<P>
1451This directive is useful for cutting down on log clutter when you
1452are certain that you only want to log certain kinds of requests, and
1453just blanket-ignore everything else. See section <A HREF="node4.html#sub:Ignore">3.4.2</A>
1454for some tips for using this directive.
1455
1456<P>
1457Each string is separated by a space, and no regular expressions or
1458globbing are allowed. Each string is evaluated as a substring of the
1459URI using strstr(). The comparison is case sensitive.
1460
1461<P>
1462This directive is completely optional. It is more general than L<SMALL>OG</SMALL>SQLR<SMALL>EQUEST</SMALL>I<SMALL>GNORE</SMALL>
1463and is evaluated before L<SMALL>OG</SMALL>SQLR<SMALL>EQUEST</SMALL>I<SMALL>GNORE</SMALL>. If
1464this directive is not used, <B>all</B> requests are accepted and
1465passed on to the other filtering directives. Therefore, only use this
1466directive if you have a specific reason to do so.
1467
1468<P>
1469
1470<H3><A NAME="SECTION000461400000000000000">
14713.6.14 LogSQLRequestIgnore</A>
1472</H3>
1473
1474<P>
1475
1476<DL COMPACT>
1477<DT>
1478<DD>Syntax:&nbsp;LogSQLRequestIgnore&nbsp;req1&nbsp;req2&nbsp;req3&nbsp;...&nbsp;reqN&nbsp;
1479
1480<P>
1481Example:&nbsp;LogSQLRequestIgnore&nbsp;root.exe&nbsp;cmd.exe&nbsp;default.ida&nbsp;favicon.ico&nbsp;
1482
1483<P>
1484Context:&nbsp;virtual&nbsp;host
1485</DD>
1486</DL>Lists a series of strings that, if present in the URI, will cause
1487that request to <B>NOT</B> be logged. This directive is
1488useful for cutting down on log clutter when you are certain that you
1489want to ignore requests for certain objects. See section <A HREF="node4.html#sub:Ignore">3.4.2</A>
1490for some tips for using this directive.
1491
1492<P>
1493Each string is separated by a space, and no regular expressions or
1494globbing are allowed. Each string is evaluated as a substring of the
1495URI using strstr(). The comparison is case sensitive.
1496
1497<P>
1498
1499<H3><A NAME="SECTION000461500000000000000">
15003.6.15 LogSQLSocketFile </A>
1501</H3>
1502
1503<P>
1504
1505<DL COMPACT>
1506<DT>
1507<DD>Syntax:&nbsp;LogSQLSocketFile&nbsp;filename&nbsp;
1508
1509<P>
1510Example:&nbsp;LogSQLSocketFile&nbsp;/tmp/mysql.sock&nbsp;
1511
1512<P>
1513Default:&nbsp;/var/lib/mysql/mysql.sock&nbsp;
1514
1515<P>
1516Context:&nbsp;main&nbsp;server&nbsp;config
1517</DD>
1518</DL>At Apache runtime you can specify the MySQL socket file to use. Set
1519this once in your main server config to override the default value.
1520This value is irrelevant if your database resides on a separate machine.
1521
1522<P>
1523mod_log_sql will automatically employ the socket for db communications
1524if the database resides on the local host. If the db resides on a
1525separate host the module will automatically use TCP/IP. This is a
1526function of the MySQL API and is not user-configurable.
1527
1528<P>
1529This is defined only once in the httpd.conf file.
1530
1531<P>
1532
1533<H3><A NAME="SECTION000461600000000000000">
15343.6.16 LogSQLTCPPort</A>
1535</H3>
1536
1537<P>
1538
1539<DL COMPACT>
1540<DT>
1541<DD>Syntax:&nbsp;LogSQLTCPPort&nbsp;portnumber
1542
1543<P>
1544Example:&nbsp;LogSQLTCPPort&nbsp;3309
1545
1546<P>
1547Default:&nbsp;3306
1548
1549<P>
1550Context:&nbsp;main&nbsp;server&nbsp;config
1551</DD>
1552</DL>Your database may listen on a different port than the default. If
1553so, use this directive to instruct the module which port to use. This
1554directive only applies if the database is on a different machine connected
1555via TCP/IP.
1556
1557<P>
1558This is defined only once in the httpd.conf file.
1559
1560<P>
1561
1562<H3><A NAME="SECTION000461700000000000000"></A><A NAME="sub:Frmat"></A>
1563<BR>
15643.6.17 LogSQLTransferLogFormat
1565</H3>
1566
1567<P>
1568
1569<DL COMPACT>
1570<DT>
1571<DD>Syntax:&nbsp;LogSQLTransferLogFormat&nbsp;format-string&nbsp;
1572
1573<P>
1574Example:&nbsp;LogSQLTransferLogFormat&nbsp;huSUTv&nbsp;
1575
1576<P>
1577Default:&nbsp;AbHhmRSsTUuv&nbsp;
1578
1579<P>
1580Context:&nbsp;virtual&nbsp;host
1581</DD>
1582</DL>Each character in the format-string defines an attribute of the request
1583that you wish to log. The default logs the information required to
1584create Combined Log Format logs, plus several extras. Here is the
1585full list of allowable keys, which sometimes resemble their Apache
1586counterparts, but do not always:
1587
1588<P>
1589<BLOCKQUOTE>
1590<TABLE CELLPADDING=3 BORDER="1">
1591<TR><TD ALIGN="CENTER">&nbsp;</TD>
1592<TH ALIGN="LEFT"><B><FONT SIZE="-1">What is this?</FONT></B></TH>
1593<TH ALIGN="LEFT"><B><FONT SIZE="-1">Data field</FONT></B></TH>
1594<TH ALIGN="LEFT"><B><FONT SIZE="-1">Column type</FONT></B></TH>
1595<TH ALIGN="LEFT"><B><FONT SIZE="-1">Example</FONT></B></TH>
1596</TR>
1597<TR><TD ALIGN="CENTER"><FONT SIZE="-1">A</FONT></TD>
1598<TD ALIGN="LEFT"><FONT SIZE="-1">User agent</FONT></TD>
1599<TD ALIGN="LEFT"><FONT SIZE="-1">agent</FONT></TD>
1600<TD ALIGN="LEFT"><FONT SIZE="-1">varchar(255)</FONT></TD>
1601<TD ALIGN="LEFT"><FONT SIZE="-1">Mozilla/4.0 (compat; MSIE 6.0; Windows)</FONT></TD>
1602</TR>
1603<TR><TD ALIGN="CENTER">a</TD>
1604<TD ALIGN="LEFT">CGI request arguments</TD>
1605<TD ALIGN="LEFT">request_args</TD>
1606<TD ALIGN="LEFT">varchar(255)</TD>
1607<TD ALIGN="LEFT">user=Smith&amp;cart=1231&amp;item=532</TD>
1608</TR>
1609<TR><TD ALIGN="CENTER"><FONT SIZE="-1">b</FONT></TD>
1610<TD ALIGN="LEFT"><FONT SIZE="-1">Bytes transfered</FONT></TD>
1611<TD ALIGN="LEFT"><FONT SIZE="-1">bytes_sent</FONT></TD>
1612<TD ALIGN="LEFT"><FONT SIZE="-1">int unsigned</FONT></TD>
1613<TD ALIGN="LEFT"><FONT SIZE="-1">32561</FONT></TD>
1614</TR>
1615<TR><TD ALIGN="CENTER"><FONT SIZE="-1">c</FONT></TD>
1616<TD ALIGN="LEFT"><FONT SIZE="-1">Text of cookie <IMG
1617 WIDTH="13" HEIGHT="21" ALIGN="BOTTOM" BORDER="0"
1618 SRC="img1.png"
1619 ALT="$^{\textrm{1}}$"></FONT></TD>
1620<TD ALIGN="LEFT"><FONT SIZE="-1">cookie</FONT></TD>
1621<TD ALIGN="LEFT"><FONT SIZE="-1">varchar(255)</FONT></TD>
1622<TD ALIGN="LEFT"><FONT SIZE="-1">Apache=sdyn.fooonline.net.1300102700823</FONT></TD>
1623</TR>
1624<TR><TD ALIGN="CENTER"><FONT SIZE="-1">H</FONT></TD>
1625<TD ALIGN="LEFT"><FONT SIZE="-1">HTTP request protocol</FONT></TD>
1626<TD ALIGN="LEFT"><FONT SIZE="-1">request_protocol</FONT></TD>
1627<TD ALIGN="LEFT"><FONT SIZE="-1">varchar(10)</FONT></TD>
1628<TD ALIGN="LEFT"><FONT SIZE="-1">HTTP/1.1</FONT></TD>
1629</TR>
1630<TR><TD ALIGN="CENTER"><FONT SIZE="-1">h</FONT></TD>
1631<TD ALIGN="LEFT"><FONT SIZE="-1">Name of remote host</FONT></TD>
1632<TD ALIGN="LEFT"><FONT SIZE="-1">remote_host</FONT></TD>
1633<TD ALIGN="LEFT"><FONT SIZE="-1">varchar(50)</FONT></TD>
1634<TD ALIGN="LEFT"><FONT SIZE="-1">blah.foobar.com</FONT></TD>
1635</TR>
1636<TR><TD ALIGN="CENTER"><FONT SIZE="-1">I</FONT></TD>
1637<TD ALIGN="LEFT"><FONT SIZE="-1">Request ID (from mod_unique_id)</FONT></TD>
1638<TD ALIGN="LEFT"><FONT SIZE="-1">id</FONT></TD>
1639<TD ALIGN="LEFT"><FONT SIZE="-1">char(19)</FONT></TD>
1640<TD ALIGN="LEFT"><FONT SIZE="-1">POlFcUBRH30AAALdBG8</FONT></TD>
1641</TR>
1642<TR><TD ALIGN="CENTER"><FONT SIZE="-1">l</FONT></TD>
1643<TD ALIGN="LEFT"><FONT SIZE="-1">Ident user info</FONT></TD>
1644<TD ALIGN="LEFT"><FONT SIZE="-1">remote_logname</FONT></TD>
1645<TD ALIGN="LEFT"><FONT SIZE="-1">varchar(50)</FONT></TD>
1646<TD ALIGN="LEFT"><FONT SIZE="-1">bobby</FONT></TD>
1647</TR>
1648<TR><TD ALIGN="CENTER"><FONT SIZE="-1">M</FONT></TD>
1649<TD ALIGN="LEFT"><FONT SIZE="-1">Machine ID <IMG
1650 WIDTH="13" HEIGHT="21" ALIGN="BOTTOM" BORDER="0"
1651 SRC="img2.png"
1652 ALT="$^{\textrm{2}}$"></FONT></TD>
1653<TD ALIGN="LEFT"><FONT SIZE="-1">machine_id</FONT></TD>
1654<TD ALIGN="LEFT"><FONT SIZE="-1">varchar(25)</FONT></TD>
1655<TD ALIGN="LEFT"><FONT SIZE="-1">web01</FONT></TD>
1656</TR>
1657<TR><TD ALIGN="CENTER"><FONT SIZE="-1">m</FONT></TD>
1658<TD ALIGN="LEFT"><FONT SIZE="-1">HTTP request method</FONT></TD>
1659<TD ALIGN="LEFT"><FONT SIZE="-1">request_method</FONT></TD>
1660<TD ALIGN="LEFT"><FONT SIZE="-1">varchar(6)</FONT></TD>
1661<TD ALIGN="LEFT"><FONT SIZE="-1">GET</FONT></TD>
1662</TR>
1663<TR><TD ALIGN="CENTER"><FONT SIZE="-1">P</FONT></TD>
1664<TD ALIGN="LEFT"><FONT SIZE="-1">httpd child PID</FONT></TD>
1665<TD ALIGN="LEFT"><FONT SIZE="-1">child_pid</FONT></TD>
1666<TD ALIGN="LEFT"><FONT SIZE="-1">smallint unsigned</FONT></TD>
1667<TD ALIGN="LEFT"><FONT SIZE="-1">3215</FONT></TD>
1668</TR>
1669<TR><TD ALIGN="CENTER"><FONT SIZE="-1">p</FONT></TD>
1670<TD ALIGN="LEFT"><FONT SIZE="-1">httpd port</FONT></TD>
1671<TD ALIGN="LEFT"><FONT SIZE="-1">server_port</FONT></TD>
1672<TD ALIGN="LEFT"><FONT SIZE="-1">smallint unsigned</FONT></TD>
1673<TD ALIGN="LEFT"><FONT SIZE="-1">80</FONT></TD>
1674</TR>
1675<TR><TD ALIGN="CENTER"><FONT SIZE="-1">R</FONT></TD>
1676<TD ALIGN="LEFT"><FONT SIZE="-1">Referer</FONT></TD>
1677<TD ALIGN="LEFT"><FONT SIZE="-1">referer</FONT></TD>
1678<TD ALIGN="LEFT"><FONT SIZE="-1">varchar(255)</FONT></TD>
1679<TD ALIGN="LEFT"><FONT SIZE="-1">http://www.biglinks4u.com/linkpage.html</FONT></TD>
1680</TR>
1681<TR><TD ALIGN="CENTER"><FONT SIZE="-1">r</FONT></TD>
1682<TD ALIGN="LEFT"><FONT SIZE="-1">Request in full form</FONT></TD>
1683<TD ALIGN="LEFT"><FONT SIZE="-1">request_line</FONT></TD>
1684<TD ALIGN="LEFT"><FONT SIZE="-1">varchar(255)</FONT></TD>
1685<TD ALIGN="LEFT"><FONT SIZE="-1">GET /books-cycroad.html HTTP/1.1</FONT></TD>
1686</TR>
1687<TR><TD ALIGN="CENTER"><FONT SIZE="-1">S</FONT></TD>
1688<TD ALIGN="LEFT"><FONT SIZE="-1">Time of request in UNIX format</FONT></TD>
1689<TD ALIGN="LEFT"><FONT SIZE="-1">time_stamp</FONT></TD>
1690<TD ALIGN="LEFT"><FONT SIZE="-1">int unsigned</FONT></TD>
1691<TD ALIGN="LEFT"><FONT SIZE="-1">1005598029</FONT></TD>
1692</TR>
1693<TR><TD ALIGN="CENTER"><FONT SIZE="-1">s</FONT></TD>
1694<TD ALIGN="LEFT"><FONT SIZE="-1">HTTP status of request</FONT></TD>
1695<TD ALIGN="LEFT"><FONT SIZE="-1">status</FONT></TD>
1696<TD ALIGN="LEFT"><FONT SIZE="-1">smallint unsigned</FONT></TD>
1697<TD ALIGN="LEFT"><FONT SIZE="-1">404</FONT></TD>
1698</TR>
1699<TR><TD ALIGN="CENTER"><FONT SIZE="-1">T</FONT></TD>
1700<TD ALIGN="LEFT"><FONT SIZE="-1">Seconds to service request</FONT></TD>
1701<TD ALIGN="LEFT"><FONT SIZE="-1">request_duration</FONT></TD>
1702<TD ALIGN="LEFT"><FONT SIZE="-1">smallint unsigned</FONT></TD>
1703<TD ALIGN="LEFT"><FONT SIZE="-1">2</FONT></TD>
1704</TR>
1705<TR><TD ALIGN="CENTER"><FONT SIZE="-1">t</FONT></TD>
1706<TD ALIGN="LEFT"><FONT SIZE="-1">Time of request in human format</FONT></TD>
1707<TD ALIGN="LEFT"><FONT SIZE="-1">request_time</FONT></TD>
1708<TD ALIGN="LEFT"><FONT SIZE="-1">char(28)</FONT></TD>
1709<TD ALIGN="LEFT"><FONT SIZE="-1">[02/Dec/2001:15:01:26 -0800]</FONT></TD>
1710</TR>
1711<TR><TD ALIGN="CENTER"><FONT SIZE="-1">U</FONT></TD>
1712<TD ALIGN="LEFT"><FONT SIZE="-1">Request in simple form</FONT></TD>
1713<TD ALIGN="LEFT"><FONT SIZE="-1">request_uri</FONT></TD>
1714<TD ALIGN="LEFT"><FONT SIZE="-1">varchar(255)</FONT></TD>
1715<TD ALIGN="LEFT"><FONT SIZE="-1">/books-cycroad.html</FONT></TD>
1716</TR>
1717<TR><TD ALIGN="CENTER"><FONT SIZE="-1">u</FONT></TD>
1718<TD ALIGN="LEFT"><FONT SIZE="-1">User info from HTTP auth</FONT></TD>
1719<TD ALIGN="LEFT"><FONT SIZE="-1">remote_user</FONT></TD>
1720<TD ALIGN="LEFT"><FONT SIZE="-1">varchar(50)</FONT></TD>
1721<TD ALIGN="LEFT"><FONT SIZE="-1">bobby</FONT></TD>
1722</TR>
1723<TR><TD ALIGN="CENTER"><FONT SIZE="-1">v</FONT></TD>
1724<TD ALIGN="LEFT"><FONT SIZE="-1">Virtual host servicing the request</FONT></TD>
1725<TD ALIGN="LEFT"><FONT SIZE="-1">virtual_host</FONT></TD>
1726<TD ALIGN="LEFT"><FONT SIZE="-1">varchar(50)</FONT></TD>
1727<TD ALIGN="LEFT"><FONT SIZE="-1">www.foobar.com</FONT></TD>
1728</TR>
1729</TABLE></BLOCKQUOTE>
1730<P>
1731<BLOCKQUOTE>
1732</BLOCKQUOTE>
1733<P>
1734<BLOCKQUOTE><IMG
1735 WIDTH="13" HEIGHT="21" ALIGN="BOTTOM" BORDER="0"
1736 SRC="img1.png"
1737 ALT="$^{\textrm{1}}$"> You must also specify L<SMALL>OG</SMALL>SQLW<SMALL>HICH</SMALL>C<SMALL>OOKIE</SMALL>
1738for this to take effect.
1739</BLOCKQUOTE>
1740<P>
1741<BLOCKQUOTE><IMG
1742 WIDTH="13" HEIGHT="21" ALIGN="BOTTOM" BORDER="0"
1743 SRC="img2.png"
1744 ALT="$^{\textrm{2}}$"> You must also specify L<SMALL>OG</SMALL>SQLM<SMALL>ACHINE</SMALL>ID for
1745this to take effect.
1746
1747</BLOCKQUOTE>
1748If you have compiled mod_log_sql with SSL logging capability, you
1749also can use these:
1750
1751<P>
1752<BLOCKQUOTE>
1753<TABLE CELLPADDING=3 BORDER="1">
1754<TR><TD ALIGN="CENTER">&nbsp;</TD>
1755<TH ALIGN="LEFT"><B>What is this?</B></TH>
1756<TH ALIGN="LEFT"><B>Data field</B></TH>
1757<TH ALIGN="LEFT"><B>Column Type</B></TH>
1758<TH ALIGN="LEFT"><B>Example</B></TH>
1759</TR>
1760<TR><TD ALIGN="CENTER">z</TD>
1761<TD ALIGN="LEFT">SSL cipher used</TD>
1762<TD ALIGN="LEFT">ssl_cipher</TD>
1763<TD ALIGN="LEFT">varchar(25)</TD>
1764<TD ALIGN="LEFT">RC4-MD5</TD>
1765</TR>
1766<TR><TD ALIGN="CENTER">q</TD>
1767<TD ALIGN="LEFT">Keysize of the SSL connection</TD>
1768<TD ALIGN="LEFT">ssl_keysize</TD>
1769<TD ALIGN="LEFT">smallint unsigned</TD>
1770<TD ALIGN="LEFT">56</TD>
1771</TR>
1772<TR><TD ALIGN="CENTER">Q</TD>
1773<TD ALIGN="LEFT">Maximum keysize supported</TD>
1774<TD ALIGN="LEFT">ssl_maxkeysize</TD>
1775<TD ALIGN="LEFT">smallint unsigned</TD>
1776<TD ALIGN="LEFT">128</TD>
1777</TR>
1778</TABLE>
1779</BLOCKQUOTE>
1780
1781<P>
1782
1783<H3><A NAME="SECTION000461800000000000000">
17843.6.18 LogSQLTransferLogTable</A>
1785</H3>
1786
1787<P>
1788
1789<DL COMPACT>
1790<DT>
1791<DD><B>MANDATORY&nbsp;(unless</B>&nbsp;<B>L<SMALL>OG</SMALL>SQLM<SMALL>ASS</SMALL>V<SMALL>IRTUAL</SMALL>H<SMALL>OSTING</SMALL></B>&nbsp;<B>is&nbsp;``on'')</B>
1792
1793<P>
1794Syntax:&nbsp;LogSQLTransferLogTable&nbsp;table-name&nbsp;
1795
1796<P>
1797Example:&nbsp;LogSQLTransferLogTable&nbsp;access_log_table&nbsp;
1798
1799<P>
1800Context:&nbsp;virtual&nbsp;host
1801</DD>
1802</DL>Defines which table is used for logging of Apache's transfers; this
1803is analogous to Apache's TransferLog directive. table-name must be
1804a valid table within the database defined in L<SMALL>OG</SMALL>SQLD<SMALL>ATABASE</SMALL>.
1805
1806<P>
1807This directive is not necessary if you declare L<SMALL>OG</SMALL>SQLM<SMALL>ASS</SMALL>V<SMALL>IRTUAL</SMALL>H<SMALL>OSTING
1808</SMALL>O<SMALL>N</SMALL>, since that directive activates dynamically-named tables. If you
1809attempt to use L<SMALL>OG</SMALL>SQLT<SMALL>RANSFER</SMALL>L<SMALL>OG</SMALL>T<SMALL>ABLE</SMALL> at the same time a
1810warning will be logged and it will be ignored, since L<SMALL>OG</SMALL>SQLM<SMALL>ASS</SMALL>V<SMALL>IRTUAL</SMALL>H<SMALL>OSTING</SMALL>
1811takes priority.
1812
1813<P>
1814
1815<H3><A NAME="SECTION000461900000000000000">
18163.6.19 LogSQLWhichCookie</A>
1817</H3>
1818
1819<P>
1820
1821<DL COMPACT>
1822<DT>
1823<DD>Syntax:&nbsp;LogSQLWhichCookie&nbsp;cookiename&nbsp;
1824
1825<P>
1826Example:&nbsp;LogSQLWhichCookie&nbsp;Clicks
1827
1828<P>
1829Default:&nbsp;None
1830
1831<P>
1832Context:&nbsp;virtual&nbsp;host
1833</DD>
1834</DL>In HTTP, cookies have names to distinguish them from each other. Using
1835mod_usertrack, for example, you can give your user-tracking cookies
1836a name with the CookieName directive.
1837
1838<P>
1839You must include a 'c' character in L<SMALL>OG</SMALL>SQLT<SMALL>RANSFER</SMALL>L<SMALL>OG</SMALL>F<SMALL>ORMAT</SMALL>
1840for this directive to take effect; once you specify 'c', L<SMALL>OG</SMALL>SQLW<SMALL>HICH</SMALL>C<SMALL>OOKIE</SMALL>
1841tells mod_log_sql which cookie to log. This is necessary because
1842you will usually be setting and receiving more than one cookie from
1843a client; this cookie designates which one to log.
1844
1845<P>
1846Note: although this was intended for people who are using mod_usertrack
1847to set user-tracking cookies, you aren't restricted in any way. You
1848can choose which cookie you wish to log to the database -any cookie
1849at all - and it doesn't necessarily have to have anything to do with
1850mod_usertrack.
1851
1852<P>
1853
1854<H3><A NAME="SECTION000462000000000000000">
18553.6.20 LogSQLWhichCookies</A>
1856</H3>
1857
1858<P>
1859
1860<DL COMPACT>
1861<DT>
1862<DD>Syntax:&nbsp;LogSQLWhichCookies&nbsp;cookie1&nbsp;cookie2&nbsp;...&nbsp;cookieN
1863
1864<P>
1865Example:&nbsp;LogSQLWhichCookies&nbsp;userlogin&nbsp;foobar&nbsp;foobaz
1866
1867<P>
1868Default:&nbsp;None
1869
1870<P>
1871Context:&nbsp;virtual&nbsp;host
1872</DD>
1873</DL>Defines the list of cookies you would like logged. This works in conjunction
1874with L<SMALL>OG</SMALL>SQLC<SMALL>OOKIE</SMALL>L<SMALL>OG</SMALL>T<SMALL>ABLE</SMALL>. This directive does not require
1875any additional characters to be added to the L<SMALL>OG</SMALL>SQLT<SMALL>RANSFER</SMALL>L<SMALL>OG</SMALL>F<SMALL>ORMAT</SMALL>
1876string. The feature is activated simply by including this directive,
1877upon which you will begin populating the separate cookie table with
1878data.
1879
1880<P>
1881Note that you must have already created the table (see create-tables.sql,
1882included in the package), or L<SMALL>OG</SMALL>SQLC<SMALL>REATE</SMALL>T<SMALL>ABLES</SMALL> must be set
1883to ``on''.
1884
1885<P>
1886
1887<H3><A NAME="SECTION000462100000000000000">
18883.6.21 LogSQLWhichHeadersIn</A>
1889</H3>
1890
1891<P>
1892
1893<DL COMPACT>
1894<DT>
1895<DD>Syntax:&nbsp;LogSQLWhichHeadersIn&nbsp;item1&nbsp;item2&nbsp;...&nbsp;itemN
1896
1897<P>
1898Example:&nbsp;LogSQLWhichHeadersIn&nbsp;UserAgent&nbsp;Accept-Encoding&nbsp;Host
1899
1900<P>
1901Default:&nbsp;None
1902
1903<P>
1904Context:&nbsp;virtual&nbsp;host
1905</DD>
1906</DL>Defines the list of inbound headers you would like logged. This works
1907in conjunction with L<SMALL>OG</SMALL>SQLH<SMALL>EADERS</SMALL>I<SMALL>N</SMALL>L<SMALL>OG</SMALL>T<SMALL>ABLE</SMALL>. This directive
1908does not require any additional characters to be added to the L<SMALL>OG</SMALL>SQLT<SMALL>RANSFER</SMALL>L<SMALL>OG</SMALL>F<SMALL>ORMAT</SMALL>
1909string. The feature is activated simply by including this directive,
1910upon which you will begin populating the separate inbound-headers
1911table with data.
1912
1913<P>
1914Note that you must have already created the table (see create-tables.sql,
1915included in the package), or L<SMALL>OG</SMALL>SQLC<SMALL>REATE</SMALL>T<SMALL>ABLES</SMALL> must be set
1916to ``on''.
1917
1918<P>
1919
1920<H3><A NAME="SECTION000462200000000000000">
19213.6.22 LogSQLWhichHeadersOut</A>
1922</H3>
1923
1924<P>
1925
1926<DL COMPACT>
1927<DT>
1928<DD>Syntax:&nbsp;LogSQLWhichHeadersOut&nbsp;item1&nbsp;item2&nbsp;...&nbsp;itemN
1929
1930<P>
1931Example:&nbsp;LogSQLWhichHeadersOut&nbsp;Expires&nbsp;Content-Type&nbsp;Cache-Control
1932
1933<P>
1934Default:&nbsp;None
1935
1936<P>
1937Context:&nbsp;virtual&nbsp;host
1938</DD>
1939</DL>Defines the list of outbound headers you would like logged. This works
1940in conjunction with L<SMALL>OG</SMALL>SQLH<SMALL>EADERS</SMALL>O<SMALL>UT</SMALL>L<SMALL>OG</SMALL>T<SMALL>ABLE</SMALL>. This directive
1941does not require any additional characters to be added to the L<SMALL>OG</SMALL>SQLT<SMALL>RANSFER</SMALL>L<SMALL>OG</SMALL>F<SMALL>ORMAT</SMALL>
1942string. The feature is activated simply by including this directive,
1943upon which you will begin populating the separate outbound-headers
1944table with data.
1945
1946<P>
1947Note that you must have already created the table (see create-tables.sql,
1948included in the package), or L<SMALL>OG</SMALL>SQLC<SMALL>REATE</SMALL>T<SMALL>ABLES</SMALL> must be set
1949to ``on''.
1950
1951<P>
1952
1953<H3><A NAME="SECTION000462300000000000000">
19543.6.23 LogSQLWhichNotes</A>
1955</H3>
1956
1957<P>
1958
1959<DL COMPACT>
1960<DT>
1961<DD>Syntax:&nbsp;LogSQLWhichNotes&nbsp;item1&nbsp;item2&nbsp;...&nbsp;itemN
1962
1963<P>
1964Example:&nbsp;LogSQLWhichNotes&nbsp;mod_gzip_result&nbsp;mod_gzip_compression_ratio
1965
1966<P>
1967Default:&nbsp;None
1968
1969<P>
1970Context:&nbsp;virtual&nbsp;host
1971</DD>
1972</DL>Defines the list of notes you would like logged. This works in conjunction
1973with L<SMALL>OG</SMALL>SQLN<SMALL>OTES</SMALL>L<SMALL>OG</SMALL>T<SMALL>ABLE</SMALL>. This directive does not require
1974any additional characters to be added to the L<SMALL>OG</SMALL>SQLT<SMALL>RANSFER</SMALL>L<SMALL>OG</SMALL>F<SMALL>ORMAT</SMALL>
1975string. The feature is activated simply by including this directive,
1976upon which you will begin populating the separate notes table with
1977data.
1978
1979<P>
1980Note that you must have already created the table (see create-tables.sql,
1981included in the package), or L<SMALL>OG</SMALL>SQLC<SMALL>REATE</SMALL>T<SMALL>ABLES</SMALL> must be set
1982to ``on''.
1983
1984<P>
1985<HR>
1986<!--Navigation Panel-->
1987<A NAME="tex2html172"
1988 HREF="node5.html">
1989<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
1990<A NAME="tex2html168"
1991 HREF="documentation.html">
1992<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
1993<A NAME="tex2html162"
1994 HREF="node3.html">
1995<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
1996<A NAME="tex2html170"
1997 HREF="node1.html">
1998<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
1999<BR>
2000<B> Next:</B> <A NAME="tex2html173"
2001 HREF="node5.html">4 FAQ</A>
2002<B> Up:</B> <A NAME="tex2html169"
2003 HREF="documentation.html">Installing and Running mod_log_sql</A>
2004<B> Previous:</B> <A NAME="tex2html163"
2005 HREF="node3.html">2 Installation</A>
2006 &nbsp; <B> <A NAME="tex2html171"
2007 HREF="node1.html">Contents</A></B>
2008<!--End of Navigation Panel-->
2009<ADDRESS>
2010Chris Powell
20112002-12-18
2012</ADDRESS>
2013</BODY>
2014</HTML>
diff --git a/docs/node5.html b/docs/node5.html
new file mode 100644
index 0000000..e9a593c
--- /dev/null
+++ b/docs/node5.html
@@ -0,0 +1,1270 @@
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2
3<!--Converted with LaTeX2HTML 2002-1 (1.68)
4original version by: Nikos Drakos, CBLU, University of Leeds
5* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
6* with significant contributions from:
7 Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
8<HTML>
9<HEAD>
10<TITLE>4 FAQ</TITLE>
11<META NAME="description" CONTENT="4 FAQ">
12<META NAME="keywords" CONTENT="documentation">
13<META NAME="resource-type" CONTENT="document">
14<META NAME="distribution" CONTENT="global">
15
16<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
17<META NAME="Generator" CONTENT="LaTeX2HTML v2002-1">
18<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
19
20<LINK REL="STYLESHEET" HREF="documentation.css">
21
22<LINK REL="next" HREF="node6.html">
23<LINK REL="previous" HREF="node4.html">
24<LINK REL="up" HREF="documentation.html">
25<LINK REL="next" HREF="node6.html">
26</HEAD>
27
28<BODY >
29<!--Navigation Panel-->
30<A NAME="tex2html219"
31 HREF="node6.html">
32<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
33<A NAME="tex2html215"
34 HREF="documentation.html">
35<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
36<A NAME="tex2html209"
37 HREF="node4.html">
38<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
39<A NAME="tex2html217"
40 HREF="node1.html">
41<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
42<BR>
43<B> Next:</B> <A NAME="tex2html220"
44 HREF="node6.html">About this document ...</A>
45<B> Up:</B> <A NAME="tex2html216"
46 HREF="documentation.html">Installing and Running mod_log_sql</A>
47<B> Previous:</B> <A NAME="tex2html210"
48 HREF="node4.html">3 Configuration</A>
49 &nbsp; <B> <A NAME="tex2html218"
50 HREF="node1.html">Contents</A></B>
51<BR>
52<BR>
53<!--End of Navigation Panel-->
54<!--Table of Child-Links-->
55<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
56
57<UL>
58<LI><A NAME="tex2html221"
59 HREF="node5.html#SECTION00051000000000000000">4.1 General module questions</A>
60<UL>
61<LI><A NAME="tex2html222"
62 HREF="node5.html#SECTION00051100000000000000">4.1.1 Why log to an SQL database?</A>
63<LI><A NAME="tex2html223"
64 HREF="node5.html#SECTION00051200000000000000">4.1.2 Why use MySQL? Are there alternatives?</A>
65<LI><A NAME="tex2html224"
66 HREF="node5.html#SECTION00051300000000000000">4.1.3 Is this code production-ready?</A>
67<LI><A NAME="tex2html225"
68 HREF="node5.html#SECTION00051400000000000000">4.1.4 Who's using mod_log_sql?</A>
69<LI><A NAME="tex2html226"
70 HREF="node5.html#SECTION00051500000000000000">4.1.5 Why doesn't the module also replace the Apache ErrorLog?</A>
71<LI><A NAME="tex2html227"
72 HREF="node5.html#SECTION00051600000000000000">4.1.6 Does mod_log_sql work with Apache 2.x?</A>
73<LI><A NAME="tex2html228"
74 HREF="node5.html#SECTION00051700000000000000">4.1.7 Does mod_log_sql connect to MySQL via TCP/IP or a socket?</A>
75<LI><A NAME="tex2html229"
76 HREF="node5.html#SECTION00051800000000000000">4.1.8 I have discovered a bug. Who can I contact?</A>
77</UL>
78<BR>
79<LI><A NAME="tex2html230"
80 HREF="node5.html#SECTION00052000000000000000">4.2 Problems</A>
81<UL>
82<LI><A NAME="tex2html231"
83 HREF="node5.html#SECTION00052100000000000000">4.2.1 Apache segfaults when using PHP and mod_log_sql</A>
84<LI><A NAME="tex2html232"
85 HREF="node5.html#SECTION00052200000000000000">4.2.2 Apache appears to start up fine, but nothing
86is getting logged in the database</A>
87<LI><A NAME="tex2html233"
88 HREF="node5.html#SECTION00052300000000000000">4.2.3 Why do I get the message ``insufficient configuration info to
89establish database link'' in my Apache error log?</A>
90<LI><A NAME="tex2html234"
91 HREF="node5.html#SECTION00052400000000000000">4.2.4 My database cannot handle all the open connections from mod_log_sql,
92is there anything I can do?</A>
93<LI><A NAME="tex2html235"
94 HREF="node5.html#SECTION00052500000000000000">4.2.5 Why do I occasionally see a ``lost connection to MySQL server''
95message in my Apache error log?</A>
96</UL>
97<BR>
98<LI><A NAME="tex2html236"
99 HREF="node5.html#SECTION00053000000000000000">4.3 Performance and Tuning</A>
100<UL>
101<LI><A NAME="tex2html237"
102 HREF="node5.html#SECTION00053100000000000000">4.3.1 How well does it perform?</A>
103<LI><A NAME="tex2html238"
104 HREF="node5.html#SECTION00053200000000000000">4.3.2 Do I need to be worried about all the running MySQL children? Will
105holding open <I>n</I> Apache-to-MySQL connections consume a lot of
106memory? </A>
107<LI><A NAME="tex2html239"
108 HREF="node5.html#SECTION00053300000000000000">4.3.3 My webserver cannot handle all the traffic that my site receives,
109is there anything I can do?</A>
110<LI><A NAME="tex2html240"
111 HREF="node5.html#SECTION00053400000000000000">4.3.4 What is the issue with activating delayed
112inserts?</A>
113</UL>
114<BR>
115<LI><A NAME="tex2html241"
116 HREF="node5.html#SECTION00054000000000000000">4.4 ``How do I...?'' - accomplishing certain tasks</A>
117<UL>
118<LI><A NAME="tex2html242"
119 HREF="node5.html#SECTION00054100000000000000">4.4.1 I am using LogSQLMassVirtualHosting, and sometimes a single VirtualHost
120gets logged to two different tables. How do I prevent that?</A>
121<LI><A NAME="tex2html243"
122 HREF="node5.html#SECTION00054200000000000000">4.4.2 How do I extract the data in a format that my analysis tool can understand?</A>
123<LI><A NAME="tex2html244"
124 HREF="node5.html#SECTION00054300000000000000">4.4.3 How can I log mod_usertrack cookies?</A>
125<LI><A NAME="tex2html245"
126 HREF="node5.html#SECTION00054400000000000000">4.4.4 What if I want to log more than one cookie? What is the difference
127between LogSQLWhichCookie and LogSQLWhichCookies?</A>
128<LI><A NAME="tex2html246"
129 HREF="node5.html#SECTION00054500000000000000">4.4.5 What are the SSL logging features, and how do I activate them?</A>
130</UL></UL>
131<!--End of Table of Child-Links-->
132<HR>
133
134<H1><A NAME="SECTION00050000000000000000">
1354 FAQ</A>
136</H1>
137
138<P>
139
140<H2><A NAME="SECTION00051000000000000000">
1414.1 General module questions</A>
142</H2>
143
144<P>
145
146<H3><A NAME="SECTION00051100000000000000"></A><A NAME="sub:why"></A>
147<BR>
1484.1.1 Why log to an SQL database?
149</H3>
150
151<P>
152To begin with, let's get it out of the way: logging to a database
153is not a panacea. But while there are complexities with this solution,
154the benefit can be substantial for certain classes of administrator
155or people with advanced requirements:
156
157<P>
158
159<UL>
160<LI>Chores like log rotation go away, as you can DELETE records from the
161SQL database once they are no longer useful. For example, the excellent
162and popular log-analysis tool Webalizer (http://www.webalizer.com)
163does not need historic logs after it has processed them, enabling
164you to delete older logs.
165</LI>
166<LI>People with clusters of web servers (for high availability) will benefit
167the most - all their webservers can log to a single SQL database.
168This obviates the need to collate/interleave the many separate logfiles,
169which can be / highly/ problematic.
170</LI>
171<LI>People acquainted with the power of SQL SELECT statements will know
172the flexibility of the extraction possibilities at their fingertips.
173</LI>
174</UL>
175For example, do you want to see all your 404's? Do this:
176
177<P>
178
179<DL COMPACT>
180<DT>
181<DD>select&nbsp;remote_host,status,request_uri,bytes_sent,from_unixtime(time_stamp)
182
183<P>
184from&nbsp;acc_log_tbl&nbsp;where&nbsp;status=404&nbsp;order&nbsp;by&nbsp;time_stamp;
185
186<P>
187</DD>
188</DL>
189<DIV ALIGN="CENTER">
190<TABLE CELLPADDING=3 BORDER="1">
191<TR><TD ALIGN="LEFT">remote_host</TD>
192<TD ALIGN="LEFT">status</TD>
193<TD ALIGN="LEFT">request_uri</TD>
194<TD ALIGN="LEFT">bytes_sent</TD>
195<TD ALIGN="LEFT">from_unixtime(time_stamp)</TD>
196</TR>
197<TR><TD ALIGN="LEFT">marge.mmm.co.uk</TD>
198<TD ALIGN="LEFT">404</TD>
199<TD ALIGN="LEFT">/favicon.ico</TD>
200<TD ALIGN="LEFT">321</TD>
201<TD ALIGN="LEFT">2001-11-20 02:30:56</TD>
202</TR>
203<TR><TD ALIGN="LEFT">62.180.239.251</TD>
204<TD ALIGN="LEFT">404</TD>
205<TD ALIGN="LEFT">/favicon.ico</TD>
206<TD ALIGN="LEFT">333</TD>
207<TD ALIGN="LEFT">2001-11-20 02:45:25</TD>
208</TR>
209<TR><TD ALIGN="LEFT">212.234.12.66</TD>
210<TD ALIGN="LEFT">404</TD>
211<TD ALIGN="LEFT">/favicon.ico</TD>
212<TD ALIGN="LEFT">321</TD>
213<TD ALIGN="LEFT">2001-11-20 03:01:00</TD>
214</TR>
215<TR><TD ALIGN="LEFT">212.210.78.254</TD>
216<TD ALIGN="LEFT">404</TD>
217<TD ALIGN="LEFT">/favicon.ico</TD>
218<TD ALIGN="LEFT">333</TD>
219<TD ALIGN="LEFT">2001-11-20 03:26:05</TD>
220</TR>
221</TABLE>
222</DIV>
223
224<P>
225
226<DL COMPACT>
227<DT>
228<DD><P>
229</DD>
230</DL>Or do you want to see how many bytes you've sent within a certain
231directory or site? Do this:
232
233<P>
234
235<DL COMPACT>
236<DT>
237<DD>select&nbsp;request_uri,sum(bytes_sent)&nbsp;as&nbsp;bytes,count(request_uri)&nbsp;as&nbsp;howmany&nbsp;from
238
239<P>
240acc_log_tbl&nbsp;where&nbsp;request_uri&nbsp;like&nbsp;'%mod_log_sql%'&nbsp;group&nbsp;by&nbsp;request_uri&nbsp;order
241
242<P>
243by&nbsp;howmany&nbsp;desc;&nbsp;
244
245<P>
246</DD>
247</DL>
248<DIV ALIGN="CENTER">
249<TABLE CELLPADDING=3 BORDER="1">
250<TR><TD ALIGN="LEFT">request_uri</TD>
251<TD ALIGN="LEFT">bytes</TD>
252<TD ALIGN="LEFT">howmany</TD>
253</TR>
254<TR><TD ALIGN="LEFT">/mod_log_sql/style_1.css</TD>
255<TD ALIGN="LEFT">157396</TD>
256<TD ALIGN="LEFT">1288</TD>
257</TR>
258<TR><TD ALIGN="LEFT">/mod_log_sql/</TD>
259<TD ALIGN="LEFT">2514337</TD>
260<TD ALIGN="LEFT">801</TD>
261</TR>
262<TR><TD ALIGN="LEFT">/mod_log_sql/mod_log_sql.tar.gz</TD>
263<TD ALIGN="LEFT">9769312</TD>
264<TD ALIGN="LEFT">456</TD>
265</TR>
266<TR><TD ALIGN="LEFT">/mod_log_sql/faq.html</TD>
267<TD ALIGN="LEFT">5038728</TD>
268<TD ALIGN="LEFT">436</TD>
269</TR>
270</TABLE>
271</DIV>
272
273<P>
274
275<DL COMPACT>
276<DT>
277<DD><P>
278</DD>
279</DL>Or maybe you want to see who's linking to you? Do this:
280
281<P>
282
283<DL COMPACT>
284<DT>
285<DD>select&nbsp;count(referer)&nbsp;as&nbsp;num,referer&nbsp;from&nbsp;acc_log_tbl&nbsp;where
286
287<P>
288request_uri='/mod_log_sql/'&nbsp;group&nbsp;by&nbsp;referer&nbsp;order&nbsp;by&nbsp;num&nbsp;desc;
289
290<P>
291</DD>
292</DL>
293<DIV ALIGN="CENTER">
294<TABLE CELLPADDING=3 BORDER="1">
295<TR><TD ALIGN="LEFT">num</TD>
296<TD ALIGN="LEFT">referer</TD>
297</TR>
298<TR><TD ALIGN="LEFT">271</TD>
299<TD ALIGN="LEFT">http://freshmeat.net/projects/mod_log_sql/</TD>
300</TR>
301<TR><TD ALIGN="LEFT">96</TD>
302<TD ALIGN="LEFT">http://modules.apache.org/search?id=339</TD>
303</TR>
304<TR><TD ALIGN="LEFT">48</TD>
305<TD ALIGN="LEFT">http://freshmeat.net/</TD>
306</TR>
307<TR><TD ALIGN="LEFT">8</TD>
308<TD ALIGN="LEFT">http://freshmeat.net</TD>
309</TR>
310</TABLE>
311</DIV>
312
313<P>
314
315<DL COMPACT>
316<DT>
317<DD><P>
318</DD>
319</DL>As you can see, there are myriad possibilities that can be constructed
320with the wonderful SQL SELECT statement. Logging to an SQL database
321can be really quite useful!
322
323<P>
324
325<H3><A NAME="SECTION00051200000000000000">
3264.1.2 Why use MySQL? Are there alternatives?</A>
327</H3>
328
329<P>
330MySQL is a robust, free, and very powerful production-quality database
331engine. It is well supported and comes with detailed documentation.
332Many 3rd-party software pacakges (e.g. Slashcode, the engine that
333powers Slashdot) run exclusively with MySQL. In other words, you will
334belong to a very robust and well-supported community by choosing MySQL.
335
336<P>
337That being said, there are alternatives. PostgreSQL is probably MySQL's
338leading &#34;competitor&#34; in the free database world.
339There is also an excellent module available for Apache to permit logging
340to a PostgreSQL database, called pgLOGd (http://www.digitalstratum.com/pglogd/).
341
342<P>
343
344<H3><A NAME="SECTION00051300000000000000">
3454.1.3 Is this code production-ready?</A>
346</H3>
347
348<P>
349By all accounts it is. It is known to work without a problem on many-thousands-of-hits-per-day
350webservers. Does that mean it is 100% bug free? Well, no software
351is. But it is well-tested and believed to be fully compatible with
352production environments. (The usual disclaimers apply. This software
353is provided without warranty of any kind.)
354
355<P>
356
357<H3><A NAME="SECTION00051400000000000000">
3584.1.4 Who's using mod_log_sql?</A>
359</H3>
360
361<P>
362Good question! It would be great to find out! If you are a production-level
363mod_log_sql user, please contact the maintainer, Chris Powell (chris@grubbybaby.com)
364so that you can be mentioned here.
365
366<P>
367
368<H3><A NAME="SECTION00051500000000000000">
3694.1.5 Why doesn't the module also replace the Apache ErrorLog?</A>
370</H3>
371
372<P>
373There are circumstances when that would be quite unwise - for example,
374if Apache could not reach the MySQL server for some reason and needed
375to log that fact. Without a text-based error log you'd never know
376anything was wrong, because Apache would be trying to log a database
377connection error to the database... you get the point.
378
379<P>
380Error logs are usually not very high-traffic and are really best left
381as text files on a web server machine.
382
383<P>
384
385<H3><A NAME="SECTION00051600000000000000">
3864.1.6 Does mod_log_sql work with Apache 2.x?</A>
387</H3>
388
389<P>
390As of this writing, no. The Apache Group significantly altered the
391module API with the release of Apache 2.0. All modules written for
3921.3, including mod_log_sql, will not work with 2.0.
393
394<P>
395mod_log_sql will eventually be ported to Apache 2.x, but not immediately.
396It is going to take some time, and there are other features that have
397higher priority. Please sign up for the announcements list (on the
398main website) or monitor the website for updates to learn when the
399port (and other releases) are available.
400
401<P>
402&lt;OPINION&gt;If you're a *NIX user, stick with Apache 1.3.x for now.
403Major modules like mod_ssl and PHP are not even ready for 2.0 yet,
404and the main benefits in 2.0 are for Win32 users anyway. Apache 1.3.x
405is rock-stable and performs equally well on *NIX as 2.0.&lt;/OPINION&gt;
406
407<P>
408
409<H3><A NAME="SECTION00051700000000000000">
4104.1.7 Does mod_log_sql connect to MySQL via TCP/IP or a socket?</A>
411</H3>
412
413<P>
414It depends! This is not determined by mod_log_sql. mod_log_sql
415relies on a connection command that is supplied in the MySQL API,
416and that command is somewhat intelligent. How it works:
417
418<P>
419
420<UL>
421<LI>if the specified MySQL database is on the same machine, the connection
422command uses a socket to communicate with MySQL
423</LI>
424<LI>if the specified MySQL database is on a different machine, mod_log_sql
425connects using TCP/IP.
426</LI>
427</UL>
428You don't have any control of which methodology is used. You can fine-tune
429some of the configuration, however. The L<SMALL>OG</SMALL>SQLS<SMALL>OCKET</SMALL>F<SMALL>ILE</SMALL>
430runtime configuration directive overrides the default of ``/var/lib/mysql/mysql.sock''
431for socket-based connections, whereas the L<SMALL>OG</SMALL>SQLTCPP<SMALL>ORT</SMALL> command
432allows to you override the default TCP port of 3306 for TCP/IP connections.
433
434<P>
435
436<H3><A NAME="SECTION00051800000000000000">
4374.1.8 I have discovered a bug. Who can I contact?</A>
438</H3>
439
440<P>
441Please contact the maintainer (chris@grubbybaby.com)! Your
442comments, suggestions, bugfixes, bug catches, and usage testimonials
443are always welcome. As free software, mod_log_sql is intended to
444be a community effort - any code contributions or other ideas will
445be fully and openly credited, of course.
446
447<P>
448
449<H2><A NAME="SECTION00052000000000000000">
4504.2 Problems</A>
451</H2>
452
453<P>
454
455<H3><A NAME="SECTION00052100000000000000">
4564.2.1 Apache segfaults when using PHP and mod_log_sql</A>
457</H3>
458
459<P>
460This occurs if you compiled PHP with MySQL database support. PHP utilizes
461its internal, bundled MySQL libraries by default. These conflict with
462the ``real'' MySQL libraries linked by mod_log_sql, causing
463the segmentation fault.
464
465<P>
466The solution is to configure PHP to link against the real MySQL libraries
467and recompile mod_php. Apache will run properly once the modules
468are all using the same version of the MySQL libraries.
469
470<P>
471
472<H3><A NAME="SECTION00052200000000000000"></A><A NAME="faq:NothingLogged"></A>
473<BR>
4744.2.2 Apache appears to start up fine, but nothing
475is getting logged in the database
476</H3>
477
478<P>
479If you do not see any entries in the access_log, then something is
480preventing the inserts from happening. This could be caused by several
481things:
482
483<P>
484
485<UL>
486<LI>Improper privileges set up in the MySQL database
487</LI>
488<LI>You aren't hitting a VirtualHost that has a LogSQLTransferLogTable
489entry
490</LI>
491<LI>You didn't specify the right database host or login information
492</LI>
493<LI>Another factor is preventing a connection to the database
494</LI>
495</UL>
496Important: it is improper to ask for help before you have followed
497these steps.
498
499<P>
500First examine the MySQL log that you established in step <A HREF="node4.html#step:EnaLog">6</A>
501of section <A HREF="node4.html#sub:PrepDb">3.1</A>. Ensure that the INSERT statements are
502not being rejected because of a malformed table name or other typographical
503error. By enabling that log, you instructed MySQL to log every connection
504and command it receives - if you see no INSERT attempts in the log,
505the module isn't successfully connecting to the database. If you see
506nothing at all in the log - not even a record of your administrative
507connection attempts, then you did not enable the log correctly. If
508you do see INSERT attempts but they are failing, the log should tell
509you why.
510
511<P>
512Second, confirm that your L<SMALL>OG</SMALL>SQL* directives are all correct.
513
514<P>
515Third, examine the Apache error logs for messages from mod_log_sql;
516the module will offer hints as to why it cannot connect, etc.
517
518<P>
519The next thing to do is recompile the module with debugging output
520activated. change the &#34;#undef DEBUG&#34; on line 8
521of mod_log_sql.c to &#34;#define DEBUG&#34; and recompile/reinstall.
522The module will now output copious notes about what it is doing, and
523this will help you (and the maintainer) solve the problem. In order
524to see the debugging messages, ensure that you make them visible using
525the L<SMALL>OG</SMALL>L<SMALL>EVEL</SMALL> directive <B>in the main server config
526as well as in each</B> <B>V<SMALL>IRTUAL</SMALL>H<SMALL>OST</SMALL></B> <B>config:</B>
527
528<P>
529
530<DL COMPACT>
531<DT>
532<DD>LogLevel&nbsp;debug
533
534<P>
535ErrorLog&nbsp;/var/log/httpd/server-messages&nbsp;
536</DD>
537</DL>
538<P>
539
540<H3><A NAME="SECTION00052300000000000000">
5414.2.3 Why do I get the message ``insufficient configuration info to
542establish database link'' in my Apache error log?</A>
543</H3>
544
545<P>
546At a minimum, L<SMALL>OG</SMALL>SQLD<SMALL>ATABASE</SMALL> and L<SMALL>OG</SMALL>SQLL<SMALL>OGIN</SMALL>I<SMALL>NFO</SMALL>
547must be defined in order for the module to be able to establish a
548database link. If these are not defined or are incomplete you will
549receive this error message.
550
551<P>
552
553<H3><A NAME="SECTION00052400000000000000">
5544.2.4 My database cannot handle all the open connections from mod_log_sql,
555is there anything I can do?</A>
556</H3>
557
558<P>
559The rule of thumb: if you have <I>n</I> webservers each configured
560to support <I>y</I> M<SMALL>AX</SMALL>C<SMALL>LIENTS</SMALL>, then your database must be
561able to handle <IMG
562 WIDTH="41" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
563 SRC="img3.png"
564 ALT="$n\times y$"> simultenous connections <I>in the worst
565case.</I> Certainly you must use common sense, consider reasonable traffic
566expectations and structure things accordingly.
567
568<P>
569Tweaking my.cnf to scale to high connection loads is imperative. But
570if hardware limitations prevent your MySQL server from gracefully
571handling the number of incoming connections, it would be beneficial
572to upgrade the memory or CPU on that server in order to handle the
573load.
574
575<P>
576Jeremy Zawodny, a highly respected MySQL user and contributor to Linux
577Magazine, has this very helpful and highly appropriate article on
578tuning MySQL: http://jeremy.zawodny.com/blog/archives/000173.html
579
580<P>
581Please remember that mod_log_sql's overriding principle is <B>performance</B>
582- that is what the target audience demands and expects. Other database
583logging solutions do not open and maintain many database connections,
584but their performance suffers drastically. For example, pgLOGd funnels
585all log connections through a separate daemon that connects to the
586database, but that bottlenecks the entire process. mod_log_sql achieves
587performance numbers an order of magnitude greater than the alternatives
588because it dispenses with the overhead associated with rapid connection
589cycling, and it doesn't attempt to shoehorn all the database traffic
590through a single extra daemon or proxy process.
591
592<P>
593
594<H3><A NAME="SECTION00052500000000000000">
5954.2.5 Why do I occasionally see a ``lost connection to MySQL server''
596message in my Apache error log?</A>
597</H3>
598
599<P>
600This message may appear every now and then in your Apache error log,
601especially on very lightly loaded servers. This doesn't mean that
602anything is necessarily wrong. Within each httpd child process, mod_log_sql
603will open (and keep open) a connection to the MySQL server. MySQL,
604however, will close connections that haven't been used in a while;
605the default timeout is 8 hours. When this occurs, mod_log_sql will
606notice and re-open the connection. That event is what is being logged,
607and looks like this:
608
609<P>
610
611<DL COMPACT>
612<DT>
613<DD>[Tue&nbsp;Nov&nbsp;12&nbsp;19:04:10&nbsp;2002]&nbsp;[error]&nbsp;mod_log_sql:&nbsp;first&nbsp;attempt&nbsp;failed,&nbsp;
614
615<P>
616&nbsp;&nbsp;API&nbsp;said:&nbsp;error&nbsp;2013,&nbsp;Lost&nbsp;connection&nbsp;to&nbsp;MySQL&nbsp;server&nbsp;during&nbsp;query&nbsp;
617
618<P>
619[Tue&nbsp;Nov&nbsp;12&nbsp;19:04:10&nbsp;2002]&nbsp;[error]&nbsp;mod_log_sql:&nbsp;reconnect&nbsp;successful
620
621<P>
622[Tue&nbsp;Nov&nbsp;12&nbsp;19:04:10&nbsp;2002]&nbsp;[error]&nbsp;mod_log_sql:&nbsp;second&nbsp;attempt&nbsp;successful
623</DD>
624</DL>Reference: MySQL documentation (http://www.mysql.com/documentation/mysql/bychapter/manual_Problems.html#Gone_away)
625
626<P>
627
628<H2><A NAME="SECTION00053000000000000000">
6294.3 Performance and Tuning</A>
630</H2>
631
632<P>
633
634<H3><A NAME="SECTION00053100000000000000">
6354.3.1 How well does it perform?</A>
636</H3>
637
638<P>
639mod_log_sql scales to very high loads. Apache 1.3.22 + mod_log_sql
640was benchmarked using the &#34;ab&#34; (Apache Bench) program
641that comes with the Apache distribution; here are the results.
642
643<P>
644Overall configuration:
645
646<P>
647
648<UL>
649<LI>Machine A: Apache webserver
650</LI>
651<LI>Machine B: MySQL server
652</LI>
653<LI>Machines A and B connected with 100Mbps Ethernet
654</LI>
655<LI>Webserver: Celeron 400, 128 MB RAM, IDE storage
656</LI>
657</UL>
658Apache configuration:
659
660<P>
661
662<DL COMPACT>
663<DT>
664<DD>Timeout&nbsp;300&nbsp;
665
666<P>
667KeepAlive&nbsp;On&nbsp;
668
669<P>
670MaxKeepAliveRequests&nbsp;100&nbsp;
671
672<P>
673KeepAliveTimeout&nbsp;15&nbsp;
674
675<P>
676MinSpareServers&nbsp;5&nbsp;
677
678<P>
679StartServers&nbsp;10&nbsp;
680
681<P>
682MaxSpareServers&nbsp;15&nbsp;
683
684<P>
685MaxClients&nbsp;256&nbsp;
686
687<P>
688MaxRequestsPerChild&nbsp;5000&nbsp;
689
690<P>
691LogSQLTransferLogFormat&nbsp;AbHhmRSsTUuvc&nbsp;
692
693<P>
694LogSQLWhichCookie&nbsp;Clicks&nbsp;
695
696<P>
697CookieTracking&nbsp;on&nbsp;
698
699<P>
700CookieName&nbsp;Clicks
701</DD>
702</DL>&#34;ab&#34; commandline:
703
704<P>
705
706<DL COMPACT>
707<DT>
708<DD>./ab&nbsp;-c&nbsp;10&nbsp;-t&nbsp;20&nbsp;-v&nbsp;2&nbsp;-C&nbsp;Clicks=ab_run&nbsp;http://www.hostname.com/target&nbsp;
709</DD>
710</DL>( 10 concurrent requests; 20 second test; setting a cookie &#34;Clicks=ab_run&#34;;
711target = the mod_log_sql homepage. )
712
713<P>
714Ten total ab runs were conducted: five with MySQL logging enabled,
715and five with all MySQL directives commented out of httpd.conf. Then
716each five were averaged. The results:
717
718<P>
719
720<UL>
721<LI>Average of five runs employing MySQL <I>and</I> standard text logging:
722<B>139.01 requests per second, zero errors</B>.
723</LI>
724<LI>Average of five runs employing <I>only</I> standard text logging:
725<B>139.96 requests per second, zero errors</B>.
726</LI>
727</UL>
728In other words, any rate-limiting effects on this particular hardware
729setup are not caused by MySQL. Note that although this very simple
730webserver setup is hardly cutting-edge - it is, after all, a fairly
731small machine - 139 requests per second equal over <I>twelve million
732hits per day.</I>
733
734<P>
735If you run this benchmark yourself, take note of three things:
736
737<P>
738
739<OL>
740<LI>Use a target URL that is on your own webserver :-).
741</LI>
742<LI>Wait until all your connections are closed out between runs; after
743several thousand requests your TCP/IP stack will be filled with hundreds
744of connections in TIME_WAIT that need to close. Do a &#34;netstat
745-t|wc -l&#34; on the webserver to see. If you don't wait, you
746can expect to see a lot of messages like &#34;ip_conntrack:
747table full, dropping packet&#34; in your logs. (This has nothing
748to do with mod_log_sql, this is simply the nature of the TCP/IP
749stack in the Linux kernel.)
750</LI>
751<LI>When done with your runs, clean these many thousands of requests out
752of your database:
753</LI>
754</OL>
755
756<DL COMPACT>
757<DT>
758<DD>mysql&gt;&nbsp;delete&nbsp;from&nbsp;access_log&nbsp;where&nbsp;agent&nbsp;like&nbsp;'ApacheBench%';&nbsp;
759
760<P>
761mysql&gt;&nbsp;optimize&nbsp;table&nbsp;access_log;&nbsp;
762</DD>
763</DL>
764<P>
765
766<H3><A NAME="SECTION00053200000000000000">
7674.3.2 Do I need to be worried about all the running MySQL children? Will
768holding open <I>n</I> Apache-to-MySQL connections consume a lot of
769memory? </A>
770</H3>
771
772<P>
773Short answer: you shouldn't be worried.
774
775<P>
776Long answer: you might be evaluating at the output of ``ps -aufxw''
777and becoming alarmed at all the 7MB httpd processes or 22MB mysqld
778children that you see. Don't be alarmed<I>.</I> It's true that mod_log_sql
779opens and holds open many MySQL connections: each httpd child maintains
780one open database connection (and holds it open for performance reasons).
781Four webservers, each running 20 Apache children, will hold open 80
782MySQL connections, which means that your MySQL server needs to handle
78380 simultaneous connections. In truth, your MySQL server needs to
784handle far more than that if traffic to your website spikes and the
785Apache webservers spawn off an additional 30 children each...
786
787<P>
788Fortunately the cost reported by 'ps -aufxw' is deceptive. This is
789due to an OS memory-management feature called ``copy-on-write.''
790When you have a number of identical child processes (e.g. Apache,
791MySQL), it would appear in ``ps'' as though each one occupies
792a great deal of RAM - as much as 7MB per httpd child! In actuality
793each additional child only occupies a small bit of extra memory -
794most of the memory pages are common to each child and therefore shared
795in a ``read-only'' fashion. The OS can get away with this because
796the majority of memory pages for one child are identical across all
797children. Instead of thinking of each child as a rubber stamp of the
798others, think of each child as a basket of links to a common memory
799area.
800
801<P>
802A memory page is only duplicated when it needs to be written to, hence
803``copy-on-write.'' The result is efficiency and decreased memory
804consumption. ``ps'' may report 7MB per child, but it might really
805only ``cost'' 900K of extra memory to add one more child. It is
806<B>not</B> <B>correct</B> to assume that 20 Apache
807children with a VSZ of 7MB each equals <!-- MATH
808 $(20\times 7MB)$
809 -->
810<IMG
811 WIDTH="90" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
812 SRC="img4.png"
813 ALT="$(20\times 7MB)$"> of memory
814consumption - the real answer is much, much lower. The same ``copy-on-write''
815rules apply to all your MySQL children: 40 mysqld children @ 22MB
816each <B>do not</B> occupy 880MB of RAM.
817
818<P>
819The bottom line: although there is a cost to spawn extra httpd or
820mysqld children, that cost is not as great as ``ps'' would lead
821you to believe.
822
823<P>
824
825<H3><A NAME="SECTION00053300000000000000">
8264.3.3 My webserver cannot handle all the traffic that my site receives,
827is there anything I can do?</A>
828</H3>
829
830<P>
831If you have exhausted all the tuning possibilities on your existing
832server, it is probably time you evaluated the benefits of clustering
833two or more webservers together in a load-balanced fashion. In fact,
834users of such a setup are mod_log_sql's target audience!
835
836<P>
837
838<H3><A NAME="SECTION00053400000000000000"></A><A NAME="sub:DelayedInsFAQ"></A>
839<BR>
8404.3.4 What is the issue with activating delayed
841inserts?
842</H3>
843
844<P>
845There are several.
846
847<P>
848
849<OL>
850<LI>INSERT DELAYED is a specific syntax to MySQL and is not supported
851by any other database. Ergo, why is it needed, and what MySQL deficiency
852is it working around? INSERT DELAYED is a kluge.
853</LI>
854<LI>The MySQL documentation is unclear whether INSERT DELAYED is even
855necessary for an optimized database. It says, ``The DELAYED option
856for the INSERT statement is a MySQL-specific option that is very useful
857if you have clients that can't wait for the INSERT to complete.''
858But then it goes on to say, ``Note that as MyISAM tables supports
859concurrent SELECT and INSERT, if there is no free blocks in the middle
860of the data file, you very seldom need to use INSERT DELAYED with
861MyISAM.''
862</LI>
863<LI>Because INSERT DELAYED returns without waiting for the data to be
864written, a hard kill of your MySQL database at the right (wrong?)
865moment could lose those logfile entries.
866</LI>
867<LI>As of MySQL version 3.23.52, the error return functions disagree after
868a failed INSERT DELAYED: mysql_errno() always returns 0, even if
869mysql_error() returns a textual error. I have reported this bug to
870the MySQL folks. However, we have no way of knowing what solution
871they will adopt to fix this, and with the worst case solution mod_log_sql
872would not be able to tell if anything went wrong with a delayed insert.
873</LI>
874</OL>
875Instead of delayed inserts, you may wish to utilize InnoDB tables
876(instead of the standard MyISAM tables). InnoDB tables suppot row-level
877locking and are recommended for high-volume databases.
878
879<P>
880If after understanding these problems you still wish to enable delayed
881inserts, section <A HREF="node4.html#sub:DelayedIns">3.5.4</A> discusses how.
882
883<P>
884
885<H2><A NAME="SECTION00054000000000000000">
8864.4 ``How do I...?'' - accomplishing certain tasks</A>
887</H2>
888
889<P>
890
891<H3><A NAME="SECTION00054100000000000000">
8924.4.1 I am using LogSQLMassVirtualHosting, and sometimes a single VirtualHost
893gets logged to two different tables. How do I prevent that?</A>
894</H3>
895
896<P>
897Proper usage of the Apache runtime S<SMALL>ERVER</SMALL>N<SMALL>AME</SMALL> directive and
898the directive U<SMALL>SE</SMALL>C<SMALL>ANONICAL</SMALL>N<SMALL>AME </SMALL>O<SMALL>N</SMALL> (or DNS) are necessary
899to prevent this problem. ``On'' is the default for U<SMALL>SE</SMALL>C<SMALL>ANONICAL</SMALL>N<SMALL>AME</SMALL>,
900and specifies that self-referential URLs are generated from the S<SMALL>ERVER</SMALL>N<SMALL>AME</SMALL>
901part of your VirtualHost:
902
903<P>
904<BLOCKQUOTE>
905With UseCanonicalName on (and in all versions prior to 1.3) Apache
906will use the ServerName and Port directives to construct the canonical
907name for the server. With UseCanonicalName off Apache will form self-referential
908URLs using the hostname and port supplied by the client if any are
909supplied (otherwise it will use the canonical name, as defined above).
910[From the Apache documentation http://httpd.apache.org/docs/mod/core.html#usecanonicalname]
911
912</BLOCKQUOTE>
913The module inherits Apache's ``knowledge'' about the server name
914being accessed. As long as those two directives are properly configured,
915mod_log_sql will log to only one table per virtual host while using
916L<SMALL>OG</SMALL>SQLM<SMALL>ASS</SMALL>V<SMALL>IRTUAL</SMALL>H<SMALL>OSTING</SMALL>.
917
918<P>
919
920<H3><A NAME="SECTION00054200000000000000">
9214.4.2 How do I extract the data in a format that my analysis tool can understand?</A>
922</H3>
923
924<P>
925mod_log_sql would be virtually useless if there weren't a way for
926you to extract the data from your database in a somewhat meaningful
927fashion. To that end there's a Perl script enclosed with the distribution.
928That script (make_combined_log.pl) is designed to extract N-many
929days worth of access logs and provide them in a Combined Log Format
930output. You can use this very tool right in /etc/crontab to extract
931logs on a regular basis so that your favorite web analysis tool can
932read them. Or you can examine the Perl code to construct your own
933custom tool.
934
935<P>
936For example, let's say that you want your web statistics updated once
937per day in the wee hours of the morning. A good way to accomplish
938that could be the following entries in /etc/crontab:
939
940<P>
941
942<DL COMPACT>
943<DT>
944<DD>#&nbsp;Generate&nbsp;the&nbsp;temporary&nbsp;apache&nbsp;logs&nbsp;from&nbsp;the&nbsp;MySQL&nbsp;database&nbsp;(for&nbsp;webalizer)&nbsp;
945
946<P>
94705&nbsp;04&nbsp;*&nbsp;*&nbsp;*&nbsp;root&nbsp;make_combined_log.pl&nbsp;1&nbsp;www.grubbybaby.com&nbsp;&gt;&nbsp;/var/log/temp01
948
949<P>
950#&nbsp;Run&nbsp;webalizer&nbsp;on&nbsp;httpd&nbsp;log&nbsp;
951
952<P>
95330&nbsp;04&nbsp;*&nbsp;*&nbsp;*&nbsp;root&nbsp;webalizer&nbsp;-c&nbsp;/etc/webalizer.conf;&nbsp;rm&nbsp;-f&nbsp;/var/log/temp01
954</DD>
955</DL>Or if you have a newer system that puts files in /etc/cron.daily etc.,
956create a file called ``webalizer'' in the cron.daily subdirectory.
957Use the following as the contents of your file, and make sure to chmod
958755 it when done.
959
960<P>
961
962<DL COMPACT>
963<DT>
964<DD>#!/bin/sh
965
966<P>
967/usr/local/sbin/make_combined_log.pl&nbsp;1&nbsp;www.yourdomain.com&nbsp;&gt;&nbsp;/var/log/httpd/templog
968
969<P>
970/usr/local/bin/webalizer&nbsp;-q&nbsp;-c&nbsp;/etc/webalizer.conf&nbsp;
971
972<P>
973rm&nbsp;-f&nbsp;/var/log/httpd/templog
974</DD>
975</DL>See? Easy.
976
977<P>
978
979<H3><A NAME="SECTION00054300000000000000"></A><A NAME="sec:cookie"></A>
980<BR>
9814.4.3 How can I log mod_usertrack cookies?
982</H3>
983
984<P>
985A number of people like to log mod_usertrack cookies in their Apache
986TransferLog to aid in understanding their visitors' clickstreams.
987This is accomplished, for example, with a statement as follows:
988
989<P>
990
991<DL COMPACT>
992<DT>
993<DD>LogFormat&nbsp;&#34;%h&nbsp;%l&nbsp;%u&nbsp;%t&nbsp;&#92;&#34;%r&#92;&#34;&nbsp;%s&nbsp;%b&nbsp;&#92;&#34;%{Referer}i&#92;&#34;&nbsp;&#92;&#34;%{User-Agent}i&#92;&#34;&#34;&nbsp;&#92;&#34;%{cookie}n&#92;&#34;&#34;
994</DD>
995</DL>Naturally it would be nice for mod_log_sql to permit the admin to
996log the cookie data as well, so as of version 1.10 you can do this.
997You need to have already compiled mod_usertrack into httpd - it's
998one of the standard Apache modules.
999
1000<P>
1001First make sure you have a column called &#34;cookie&#34;
1002in the MySQL database to hold the cookies, which can be done as follows
1003if you already have a working database:
1004
1005<P>
1006
1007<DL COMPACT>
1008<DT>
1009<DD>alter&nbsp;table&nbsp;acc_log_tbl&nbsp;add&nbsp;column&nbsp;cookie&nbsp;varchar(255);
1010</DD>
1011</DL>Next configure your server to set usertracking cookies as follows,
1012and make sure you include the new 'c' directive in your L<SMALL>OG</SMALL>SQLT<SMALL>RANSFER</SMALL>L<SMALL>OG</SMALL>F<SMALL>ORMAT</SMALL>,
1013which activates cookie logging. Here's an example:
1014
1015<P>
1016
1017<DL COMPACT>
1018<DT>
1019<DD>&lt;VirtualHost&nbsp;1.2.3.4&gt;&nbsp;
1020
1021<P>
1022&nbsp;CookieTracking&nbsp;on&nbsp;
1023
1024<P>
1025&nbsp;CookieStyle&nbsp;Cookie&nbsp;
1026
1027<P>
1028&nbsp;CookieName&nbsp;Foobar&nbsp;
1029
1030<P>
1031&nbsp;LogSQLTransferLogFormat&nbsp;huSUsbTvRAc&nbsp;
1032
1033<P>
1034&nbsp;LogSQLWhichCookie&nbsp;Foobar&nbsp;
1035
1036<P>
1037&lt;/VirtualHost&gt;
1038</DD>
1039</DL>The first three lines configure mod_usertrack to create a COOKIE
1040(RFC 2109) format cookie called Foobar. The last two lines tell mod_log_sql
1041to log cookies named Foobar. You have to choose which cookie to log
1042because more than one cookie can/will be sent to the server by the
1043client.
1044
1045<P>
1046Recap: the 'c' character <I>activates</I> cookie logging, and the
1047L<SMALL>OG</SMALL>SQLW<SMALL>HICH</SMALL>C<SMALL>OOKIE</SMALL> directive <I>chooses</I> which cookie to
1048log.
1049
1050<P>
1051FYI, you are advised NOT to use C<SMALL>OOKIE</SMALL>S<SMALL>TYLE </SMALL>C<SMALL>OOKIE2</SMALL> - it
1052seems that even newer browsers (IE 5.5, etc.) have trouble with the
1053new COOKIE2 (RFC 2965) format. Just stick with the standard COOKIE
1054format and you'll be fine.
1055
1056<P>
1057Perform some hits on your server and run a select:
1058
1059<P>
1060
1061<DL COMPACT>
1062<DT>
1063<DD>mysql&gt;&nbsp;select&nbsp;request_uri,cookie&nbsp;from&nbsp;access_log&nbsp;where&nbsp;cookie&nbsp;is&nbsp;not&nbsp;null;
1064
1065<P>
1066</DD>
1067</DL>
1068<DIV ALIGN="CENTER">
1069<TABLE CELLPADDING=3 BORDER="1">
1070<TR><TD ALIGN="LEFT">request_uri</TD>
1071<TD ALIGN="LEFT">cookie</TD>
1072</TR>
1073<TR><TD ALIGN="LEFT">/mod_log_sql/</TD>
1074<TD ALIGN="LEFT">ool-18e4.dyn.optonline.net.130051007102700823</TD>
1075</TR>
1076<TR><TD ALIGN="LEFT">/mod_log_sql/usa.gif</TD>
1077<TD ALIGN="LEFT">ool-18e4.dyn.optonline.net.130051007102700823</TD>
1078</TR>
1079<TR><TD ALIGN="LEFT">/mod_log_sql/style_1.css</TD>
1080<TD ALIGN="LEFT">ool-18e4.dyn.optonline.net.130051007102700823</TD>
1081</TR>
1082</TABLE>
1083</DIV>
1084
1085<P>
1086
1087<DL COMPACT>
1088<DT>
1089<DD><P>
1090</DD>
1091</DL>
1092<P>
1093
1094<H3><A NAME="SECTION00054400000000000000">
10954.4.4 What if I want to log more than one cookie? What is the difference
1096between LogSQLWhichCookie and LogSQLWhichCookies?</A>
1097</H3>
1098
1099<P>
1100As of version 1.17, you have a choice in how you want cookie logging
1101handled.
1102
1103<P>
1104If you are interested in logging only one cookie per request, follow
1105the instructions in section <A HREF="node5.html#sec:cookie">4.4.3</A> above. That cookie will
1106be logged to a column in the regular access_log table, and the actual
1107cookie you want to log is specified with L<SMALL>OG</SMALL>SQLW<SMALL>HICH</SMALL>C<SMALL>OOKIE</SMALL>.
1108Don't forget to specify the 'c' character in L<SMALL>OG</SMALL>SQLT<SMALL>RANSFER</SMALL>L<SMALL>OG</SMALL>F<SMALL>ORMAT</SMALL>.
1109
1110<P>
1111If, however, you need to log multiple cookies per request, you must
1112employ the L<SMALL>OG</SMALL>SQLW<SMALL>HICH</SMALL>C<SMALL>OOKIES</SMALL> (note the plural) directive.
1113The cookies you specify will be logged to a separate table (as discussed
1114in section <A HREF="node4.html#secMulTable">3.5.2</A>), and entries in that table will be
1115linked to the regular access_log entries via the unique ID that is
1116supplied by mod_unique_id. Without mod_unique_id the information
1117will still be logged but you will be unable to correlate which cookies
1118go with which access-requests. Furthermore, with L<SMALL>OG</SMALL>SQLW<SMALL>HICH</SMALL>C<SMALL>OOKIES</SMALL>,
1119you do <B>not</B> need to include the 'c' character in L<SMALL>OG</SMALL>SQLT<SMALL>RANSFER</SMALL>L<SMALL>OG</SMALL>F<SMALL>ORMAT</SMALL>.
1120
1121<P>
1122L<SMALL>OG</SMALL>SQLW<SMALL>HICH</SMALL>C<SMALL>OOKIE</SMALL> and L<SMALL>OG</SMALL>SQLW<SMALL>HICH</SMALL>C<SMALL>OOKIES</SMALL> can coexist
1123without conflict because they operate on entireley different tables,
1124but you're better off choosing the one you need.
1125
1126<P>
1127
1128<H3><A NAME="SECTION00054500000000000000">
11294.4.5 What are the SSL logging features, and how do I activate them?</A>
1130</H3>
1131
1132<P>
1133Note: you do <B>not</B> need to compile SSL support into mod_log_sql
1134in order to simply use it with a secure site. You only need to compile
1135SSL support into mod_log_sql if you want to log SSL-specific data
1136such as the cipher type used, or the keysize that was negotiated.
1137If that information is unimportant to you, you can ignore this FAQ.
1138
1139<P>
1140By adding certain characters to your L<SMALL>OG</SMALL>SQLT<SMALL>RANSFER</SMALL>L<SMALL>OG</SMALL>F<SMALL>ORMAT</SMALL>
1141string you can tell mod_log_sql to log the SSL cipher, the SSL keysize
1142of the connection, and the maximum keysize that was available. This
1143would let you tell, for example, which clients were using only export-grade
1144security to access your secure software area.
1145
1146<P>
1147You can compile mod_log_sql with SSL logging support if you have
1148the right packages installed. If you already have an SSL-enabled Apache
1149then you by definition have the correct packages already installed:
1150OpenSSL and mod_ssl.
1151
1152<P>
1153You need to ensure that your database is set up to log the SSL data.
1154Issue the following commands to MySQL if your access table does not
1155already have them:
1156
1157<P>
1158
1159<DL COMPACT>
1160<DT>
1161<DD>alter&nbsp;table&nbsp;access_log&nbsp;add&nbsp;column&nbsp;ssl_cipher&nbsp;varchar(25);
1162
1163<P>
1164alter&nbsp;table&nbsp;access_log&nbsp;add&nbsp;column&nbsp;ssl_keysize&nbsp;smallint&nbsp;unsigned;
1165
1166<P>
1167alter&nbsp;table&nbsp;access_log&nbsp;add&nbsp;column&nbsp;ssl_maxkeysize&nbsp;smallint&nbsp;unsigned;
1168</DD>
1169</DL>Finally configure httpd.conf to activate the SSL fields. Note that
1170this is only meaningful in a VirtualHost that is set up for SSL.
1171
1172<P>
1173
1174<DL COMPACT>
1175<DT>
1176<DD>&lt;VirtualHost&nbsp;1.2.3.4:443&gt;&nbsp;
1177
1178<P>
1179&nbsp;LogSQLTransferLogFormat&nbsp;AbHhmRSsTUuvc<B>Qqz</B>&nbsp;
1180
1181<P>
1182&lt;/VirtualHost&gt;
1183</DD>
1184</DL>The last three characters (Qqz) in the directive are the SSL ones;
1185see section <A HREF="node4.html#sub:Frmat">3.6.17</A> in the directives documentation for details
1186of the L<SMALL>OG</SMALL>SQLT<SMALL>RANSFER</SMALL>L<SMALL>OG</SMALL>F<SMALL>ORMAT</SMALL> directive.
1187
1188<P>
1189Restart Apache, then perform some hits on your server. Then run the
1190following select statement:
1191
1192<P>
1193
1194<DL COMPACT>
1195<DT>
1196<DD>mysql&gt;&nbsp;select&nbsp;remote_host,request_uri,ssl_cipher,ssl_keysize,ssl_maxkeysize
1197
1198<P>
1199from&nbsp;access_log&nbsp;where&nbsp;ssl_cipher&nbsp;is&nbsp;not&nbsp;null;
1200
1201<P>
1202</DD>
1203</DL>
1204<DIV ALIGN="CENTER">
1205<TABLE CELLPADDING=3 BORDER="1">
1206<TR><TD ALIGN="LEFT">remote_host</TD>
1207<TD ALIGN="LEFT">request_uri</TD>
1208<TD ALIGN="LEFT">ssl_cipher</TD>
1209<TD ALIGN="LEFT">ssl_keysize</TD>
1210<TD ALIGN="LEFT">ssl_maxkeysize</TD>
1211</TR>
1212<TR><TD ALIGN="LEFT">216.190.52.4</TD>
1213<TD ALIGN="LEFT">/dir/somefile.html</TD>
1214<TD ALIGN="LEFT">RC4-MD5</TD>
1215<TD ALIGN="LEFT">128</TD>
1216<TD ALIGN="LEFT">128</TD>
1217</TR>
1218<TR><TD ALIGN="LEFT">216.190.52.4</TD>
1219<TD ALIGN="LEFT">/dir/somefile.gif</TD>
1220<TD ALIGN="LEFT">RC4-MD5</TD>
1221<TD ALIGN="LEFT">128</TD>
1222<TD ALIGN="LEFT">128</TD>
1223</TR>
1224<TR><TD ALIGN="LEFT">216.190.52.4</TD>
1225<TD ALIGN="LEFT">/dir/somefile.jpg</TD>
1226<TD ALIGN="LEFT">RC4-MD5</TD>
1227<TD ALIGN="LEFT">128</TD>
1228<TD ALIGN="LEFT">128</TD>
1229</TR>
1230</TABLE>
1231</DIV>
1232
1233<P>
1234
1235<DL COMPACT>
1236<DT>
1237<DD>
1238</DD>
1239</DL>
1240<P>
1241<HR>
1242<!--Navigation Panel-->
1243<A NAME="tex2html219"
1244 HREF="node6.html">
1245<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
1246<A NAME="tex2html215"
1247 HREF="documentation.html">
1248<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
1249<A NAME="tex2html209"
1250 HREF="node4.html">
1251<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
1252<A NAME="tex2html217"
1253 HREF="node1.html">
1254<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
1255<BR>
1256<B> Next:</B> <A NAME="tex2html220"
1257 HREF="node6.html">About this document ...</A>
1258<B> Up:</B> <A NAME="tex2html216"
1259 HREF="documentation.html">Installing and Running mod_log_sql</A>
1260<B> Previous:</B> <A NAME="tex2html210"
1261 HREF="node4.html">3 Configuration</A>
1262 &nbsp; <B> <A NAME="tex2html218"
1263 HREF="node1.html">Contents</A></B>
1264<!--End of Navigation Panel-->
1265<ADDRESS>
1266Chris Powell
12672002-12-18
1268</ADDRESS>
1269</BODY>
1270</HTML>
diff --git a/docs/node6.html b/docs/node6.html
new file mode 100644
index 0000000..cefac28
--- /dev/null
+++ b/docs/node6.html
@@ -0,0 +1,74 @@
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2
3<!--Converted with LaTeX2HTML 2002-1 (1.68)
4original version by: Nikos Drakos, CBLU, University of Leeds
5* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
6* with significant contributions from:
7 Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
8<HTML>
9<HEAD>
10<TITLE>About this document ...</TITLE>
11<META NAME="description" CONTENT="About this document ...">
12<META NAME="keywords" CONTENT="documentation">
13<META NAME="resource-type" CONTENT="document">
14<META NAME="distribution" CONTENT="global">
15
16<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
17<META NAME="Generator" CONTENT="LaTeX2HTML v2002-1">
18<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
19
20<LINK REL="STYLESHEET" HREF="documentation.css">
21
22<LINK REL="previous" HREF="node5.html">
23<LINK REL="up" HREF="documentation.html">
24</HEAD>
25
26<BODY >
27<!--Navigation Panel-->
28<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_g.png">
29<A NAME="tex2html251"
30 HREF="documentation.html">
31<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
32<A NAME="tex2html247"
33 HREF="node5.html">
34<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
35<A NAME="tex2html253"
36 HREF="node1.html">
37<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
38<BR>
39<B> Up:</B> <A NAME="tex2html252"
40 HREF="documentation.html">Installing and Running mod_log_sql</A>
41<B> Previous:</B> <A NAME="tex2html248"
42 HREF="node5.html">4 FAQ</A>
43 &nbsp; <B> <A NAME="tex2html254"
44 HREF="node1.html">Contents</A></B>
45<BR>
46<BR>
47<!--End of Navigation Panel-->
48
49<H1><A NAME="SECTION00060000000000000000">
50About this document ...</A>
51</H1>
52 <STRONG>Installing and Running mod_log_sql</STRONG><P>
53This document was generated using the
54<A HREF="http://www.latex2html.org/"><STRONG>LaTeX</STRONG>2<tt>HTML</tt></A> translator Version 2002-1 (1.68)
55<P>
56Copyright &#169; 1993, 1994, 1995, 1996,
57<A HREF="http://cbl.leeds.ac.uk/nikos/personal.html">Nikos Drakos</A>,
58Computer Based Learning Unit, University of Leeds.
59<BR>
60Copyright &#169; 1997, 1998, 1999,
61<A HREF="http://www.maths.mq.edu.au/~ross/">Ross Moore</A>,
62Mathematics Department, Macquarie University, Sydney.
63<P>
64The command line arguments were: <BR>
65 <STRONG>latex2html</STRONG> <TT>-local_icons -show_section_numbers -split 4 -navigation -noindex_in_navigation -contents_in_navigation -dir Documentation/HTML Documentation/documentation.tex</TT>
66<P>
67The translation was initiated by Chris Powell on 2002-12-18
68<BR><HR>
69<ADDRESS>
70Chris Powell
712002-12-18
72</ADDRESS>
73</BODY>
74</HTML>
diff --git a/docs/prev.png b/docs/prev.png
new file mode 100644
index 0000000..e60b8b4
--- /dev/null
+++ b/docs/prev.png
Binary files differ
diff --git a/docs/prev_g.png b/docs/prev_g.png
new file mode 100644
index 0000000..476d956
--- /dev/null
+++ b/docs/prev_g.png
Binary files differ
diff --git a/docs/style_1.css b/docs/style_1.css
new file mode 100644
index 0000000..f12a3af
--- /dev/null
+++ b/docs/style_1.css
@@ -0,0 +1,33 @@
1body {
2 margin-left: 3%;
3 background-color: #ccccFF;
4 font-family: sans-serif;
5}
6
7h1 {
8 text-align: center;
9}
10
11h2 {
12 margin-left: -1%;
13 font-size: 150%;
14}
15
16h3 {
17 margin-left: -1%;
18}
19
20h4 {
21 text-align: center;
22}
23
24p {
25}
26
27pre {
28 font-family: monospace;
29}
30
31DD {
32 font-family: monospace;
33} \ No newline at end of file
diff --git a/docs/up.png b/docs/up.png
new file mode 100644
index 0000000..3937e16
--- /dev/null
+++ b/docs/up.png
Binary files differ
diff --git a/docs/up_g.png b/docs/up_g.png
new file mode 100644
index 0000000..54ceb68
--- /dev/null
+++ b/docs/up_g.png
Binary files differ