root/livinglogic.python.aplora/INSTALL.xml @ 6:405209d4e62b

Revision 6:405209d4e62b, 2.5 KB (checked in by Walter Doerwald <walter@…>, 14 years ago)

Fix typo.

Line 
1<?xml version='1.0' encoding='iso-8859-1'?>
2<section><title>Requirements</title>
3<par>To use this script you need the following software packages:</par>
4<olist>
5<item><link href="http://www.python.org/">Python</link> (any version supported by cx_Oracle should do);</item>
6<item><link href="http://httpd.apache.org/">Apache</link> (2.0.46 or later, although it's possible to get it to work with Apache 1.3 by removing a few of the logging parameters);</item>
7<item><link href="http://www.computronix.com/utilities.shtml#Oracle">cx_Oracle</link> (4.0 or later).</item>
8</olist>
9</section>
10
11
12<section><title>Installation</title>
13<par><app>distutils</app> is used for installation, so it's rather simple.
14Execute the following command:</par>
15<prog>
16python setup.py install
17</prog>
18
19<par>This will copy aplora.py to <dirname>/usr/local/bin</dirname>. If you
20want to install the script somewhere else you can use the
21<option>--install-scripts</option> option.</par>
22
23<par>There is no Windows binary.</par>
24
25<par>To create the database table and the stored procedure use <filename>aplora.sql</filename>.</par>
26
27<par>If you have difficulties installing this software, send a problem report
28to Walter Dörwald (<email>walter@livinglogic.de</email>).</par>
29
30</section>
31
32
33<section><title>Configuration</title>
34<par>First you have to define the logging format to be used by aplora. Put
35the following two lines into your <filename>httpd.conf</filename>:</par>
36
37<prog>
38LogFormat "%{APLORA_SITE}e\t%{%s}t\t%D\t%a\t%{User-Agent}i\t%U\t%q\t%m\t%>s\t0\t0\t%B\t%{Referer}i\t%{Content-Type}o\t%{JSESSIONID}C\t%{Set-Cookie}o" aplora
39SetEnv APLORA_SITE default
40</prog>
41
42<par>Then for each configured location that you wish to log as a
43seperate site (e.g. each virtual server), put something like the
44following into each <lit>&lt;Location&gt;</lit> or
45<lit>&lt;Directory&gt;</lit> or virtual server configuration:</par>
46
47<prog>
48SetEnv APLORA_SITE <rep>sitename</rep>
49CustomLog "|/usr/local/bin/aplora.py -o <rep>ORACLE_HOME</rep> -c <rep>user/pass@db</rep> -p log_insert" aplora
50</prog>
51
52<par>Replace <code><rep>sitename</rep></code> with the name of the site
53(which will be put into the field <lit>LOG_SITE</lit>,
54<code><rep>ORACLE_HOME</rep></code> with the content of your
55<lit>ORACLE_HOME</lit> environment variable (e.g. <lit>/oracle/Client</lit>)
56and <code><lit>user/pass@db</lit></code> with the connect string appropriate.
57The option <option>-p</option> can be used to specify a different insert
58procedure.</par>
59
60</section>
Note: See TracBrowser for help on using the browser.