Sophie

Sophie

distrib > Mandriva > 10.0-com > i586 > by-pkgid > 3f2c1a4d5f2109d86fb49c63746a27e4 > files > 1

mod_log_mysql-1.15-8mdk.src.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<link rel=StyleSheet href="style_1.css" type="text/css" media=screen>

<TITLE>mod_log_mysql Configuration Directives</TITLE>
</HEAD>


<BODY>
<h1>mod_log_mysql Configuration Directives</h1>
If you are using version 1.10 or older, please see the <A href="/mod_log_mysql/directives-old.html">old style directives</A>.
<P>

<UL>
<LI><A href="#1">MySQLLoginInfo</A>
<LI><A href="#2">MySQLDatabase</A>
<LI><A href="#3">MySQLTransferLogTable</A>
<LI><A href="#4">MySQLRefererLogTable</A>
<LI><A href="#5">MySQLAgentLogTable</A>
<LI><A href="#6">MySQLRequestIgnore</A>
<LI><A href="#7">MySQLRemhostIgnore</A>
<LI><A href="#8">MySQLRefererIgnore</A>
<LI><A href="#10">MySQLWhichCookie</A>
<LI><A href="#9">MySQLTransferLogFormat</A>
</UL>

<HR>
<A name="1"><h3>MySQLLoginInfo</h3></A>
Syntax: MySQLLoginInfo <em>host user password</em><BR>
Example: MySQLLoginInfo foobar.baz.com logwriter passw0rd<BR>
Context: server config<P>

Defines the general parameters of the MySQL host to which you will be logging. <em>host</em> is the
hostname or IP address of the MySQL machine.  <em>user</em> is the MySQL userid (not a Unix
userid!) with INSERT privileges on the table defined in <strong>MySQLTransferLogTable</strong>.
<em>password</em> is that user's password.  This is defined <em>only once</em> in the httpd.conf
file.
<P>

<HR>
<A name="2"><h3>MySQLDatabase</h3></A>
Syntax: MySQLDatabase <em>database</em><BR>
Example: MySQLDatabase loggingdb<BR>
Context: server config<P>
Defines the database that is used for logging.  <em>database</em> must be operating on the MySQL host
defined in <strong>MySQLLoginInfo</strong>.  This is defined <em>only once</em> in the httpd.conf   
file.
<P>

<HR>
<A name="3"><h3>MySQLTransferLogTable</h3></A>
Syntax: MySQLTransferLogTable <em>table-name</em><BR>
Example: MySQLTransferLogTable access_log_table<BR>
Context: virtual host<P>
Defines which table is used for logging of Apache's transfers; this is analogous to Apache's
TransferLog directive.  <em>table-name</em> must be a valid table within the
database defined in <strong>MySQLDatabase</strong>.
<P>


<HR>
<A name="4"><h3>MySQLRefererLogTable</h3></A>
Syntax: MySQLRefererLogTable <em>table-name</em><BR>
Example: MySQLRefererLogTable refer_table<BR>
Context: virtual host<P>
<strong>Usage of this directive is deprecated.</strong>  Although it should still work, all
mod_log_mysql users are encouraged to NOT log Referer and Agent separately.
<P>


<HR>
<A name="5"><h3>MySQLAgentLogTable</h3></A>
Syntax: MySQLAgentLogTable <em>table-name</em><BR>
Example: MySQLAgentLogTable agent_table<BR>
Context: virtual host<P>
<strong>Usage of this directive is deprecated.</strong>  Although it should still work, all
mod_log_mysql users are encouraged to NOT log Referer and Agent separately.                   
<P>


<HR>
<A name="6"><h3>MySQLRequestIgnore</h3></A>
Syntax: MySQLRequestIgnore <em>req1 req2 req3 ... reqN</em><BR>
Example: MySQLRequestIgnore root.exe cmd.exe default.ida favicon.ico<BR>
Context: virtual host<P>
Lists a series of strings that, if present in the URI, will cause that request NOT to be logged. 
This directive is useful for cutting down on log clutter when you KNOW that you do not want to log
requests for certain objects.  (The example above is a genuinely useful one; it will prevent
logging of many common Microsoft-based worm intrusion attempts, as well as those ridiculous requests for the favicon.)
<P>
Each string is separated by a space, and NO regular expressions or globbing are allowed.  Each
string is evaluated as a substring of the URI using strstr().
<P>


<HR>
<A name="7"><h3>MySQLRemhostIgnore</h3></A>
Syntax: MySQLRemhostIgnore <em>host1 host2 host3 ... hostN</em><BR>
Example: MySQLRemhostIgnore localnet.com<BR>
Context: virtual host<P>
Lists a series of strings that, if present in the REMOTE_HOST, will cause that request NOT to be
logged.  This directive is useful for cutting down on log clutter when you KNOW that you do not
want to log requests from certain hosts, such as your own internal network machines.
<P>
Each string is separated by a space, and NO regular expressions or globbing are allowed.  Each
string is evaluated as a substring of the REMOTE_HOST using strstr().
<P>


<HR>
<A name="8"><h3>MySQLRefererIgnore</h3></A>
Syntax: MySQLRefererIgnore <em>ref1 ref2 ref3 ... refN</em><BR>
Example: MySQLRefererIgnore google.com<BR>
Context: virtual host<P>
Lists a series of strings that, if present in the REFERER, will cause that request NOT to be
logged.  This directive is useful for cutting down on log clutter when you KNOW that you do not
want to log requests from certain referers.
<P>
Each string is separated by a space, and NO regular expressions or globbing are allowed.  Each
string is evaluated as a substring of the REMOTE_HOST using strstr().
<P>


<HR>
<A name="10"><h3>MySQLWhichCookie</h3></A>
Syntax: MySQLWhichCookie <em>cookiename</em><BR>
Example: MySQLWhichCookie Apache<BR>
Default: None.  You must set this if you wish to capture cookies.<BR>
Context: virtual host<P>
If you have activated cookie logging in MySQLTransferLogFormat, then MySQLWhichCookie
tells mod_log_mysql which cookie data to log.  This is useful because many times you will
be setting and receiving more than one cookie from a client; without this directive you'd
be unable to choose which cookie is your mod_usertrack cookie.
<P>
Note: although this was intended for people using mod_usertrack to set usertracking cookies,
you aren't restricted in any way.  You can choose which cookie you wish to log to the database,
and it doesn't necessarily have to have anything to do with mod_usertrack.
<P>


<HR>
<A name="9"><h3>MySQLTransferLogFormat</h3></A>
Syntax: MySQLTransferLogFormat <em>format-string</em><BR>
Example: MySQLTransferLogFormat huSUTv<BR>
Default: AbHhmRSsTUuv<BR>
Context: virtual host<P>
Each character in the format-string defines an attribute of the request that you wish to log.  The
default logs the information required to create Combined Log Format logs, plus several extras. 
Here is the full list of allowable keys, which SOMETIMES resemble their Apache counterparts, but
do not always:
<P>
<TABLE BORDER=1>
<TR><TH>Character</TH><TH>What is this?</TH><TH>MySQL DB field</TH><TH>Recommended<BR>column type</TH><TH>Example</TH></TR>
<TR><TD ALIGN=CENTER>A</TD><TD>User agent</TD><TD>agent</TD><TD>varchar(255)</TD><TD>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)</TD></TR>
<TR><TD ALIGN=CENTER>b</TD><TD>Bytes transfered</TD><TD>bytes_sent</TD><TD>int</TD><TD>32561</TD></TR>
<TR><TD ALIGN=CENTER>c</TD><TD>Text of cookie</TD><TD>cookie</TD><TD>varchar(255)</TD><TD>Apache=sdyn.fooonline.net.130051007102700823</TD></TR>
<TR><TD ALIGN=CENTER>f</TD><TD>&nbsp;</TD><TD>request_file</TD><TD>varchar(255)</TD><TD>&nbsp;</TD></TR>
<TR><TD ALIGN=CENTER>H</TD><TD>HTTP request protocol</TD><TD>request_protocol</TD><TD>varchar(10)</TD><TD>HTTP/1.1</TD></TR>
<TR><TD ALIGN=CENTER>h</TD><TD>Name of remote host</TD><TD>remote_host</TD><TD>varchar(50)</TD><TD>blah.foobar.com</TD></TR>
<TR><TD ALIGN=CENTER>l</TD><TD>Ident user info</TD><TD>remote_logname</TD><TD>varchar(50)</TD><TD>bobby</TD></TR>
<TR><TD ALIGN=CENTER>m</TD><TD>HTTP request method</TD><TD>request_method</TD><TD>varchar(6)</TD><TD>GET</TD></TR>
<TR><TD ALIGN=CENTER>P</TD><TD>httpd child PID</TD><TD>child_pid</TD><TD>unsigned smallint</TD><TD>3215</TD></TR>
<TR><TD ALIGN=CENTER>p</TD><TD>httpd port</TD><TD>server_port</TD><TD>unsigned smallint</TD><TD>80</TD></TR>
<TR><TD ALIGN=CENTER>R</TD><TD>Referer</TD><TD>referer</TD><TD>varchar(255)</TD><TD>http://www.biglinkstoyou.com/linkpage.html</TD></TR>
<TR><TD ALIGN=CENTER>r</TD><TD>Request in full form</TD><TD>request_line</TD><TD>varchar(255)</TD><TD>GET /books-cycroad.html HTTP/1.1</TD></TR>
<TR><TD ALIGN=CENTER>S</TD><TD>Time of request in UNIX format</TD><TD>time_stamp</TD><TD>unsigned int</TD><TD>1005598029</TD></TR>
<TR><TD ALIGN=CENTER>s</TD><TD>HTTP status of request</TD><TD>status</TD><TD>smallint</TD><TD>404</TD></TR>
<TR><TD ALIGN=CENTER>T</TD><TD>Seconds to service request</TD><TD>request_duration</TD><TD>smallint</TD><TD>2</TD></TR>
<TR><TD ALIGN=CENTER>t</TD><TD>Time of request in human format</TD><TD>request_time</TD><TD>char(28)</TD><TD>[02/Dec/2001:15:01:26 -0800]</TD></TR>
<TR><TD ALIGN=CENTER>u</TD><TD>User info from auth</TD><TD>remote_user</TD><TD>varchar(50)</TD><TD>bobby</TD></TR>
<TR><TD ALIGN=CENTER>U</TD><TD>Request in simple form</TD><TD>request_uri</TD><TD>varchar(255)</TD><TD>/books-cycroad.html</TD></TR>
<TR><TD ALIGN=CENTER>v</TD><TD>Virtual host servicing request</TD><TD>virtual_host</TD><TD>varchar(50)</TD><TD>www.foobar.com</TD></TR>
</TABLE>

<P>
If you have compiled mod_log_mysql with WANT_SSL_LOGGING, you also get these:
<P>
<TABLE BORDER=1>
<TR><TH>Character</TH><TH>MySQL DB field it activates</TH><TH>Recommended<BR>column type</TH><TH>Example</TH></TR>
<TR><TD ALIGN=CENTER>z</TD><TD>ssl_cipher</TD><TD>varchar(25)</TD><TD>RC4-MD5</TD></TR>
<TR><TD ALIGN=CENTER>q</TD><TD>ssl_keysize</TD><TD>smallint unsigned</TD><TD>56</TD></TR>
<TR><TD ALIGN=CENTER>Q</TD><TD>ssl_maxkeysize</TD><TD>smallint unsigned</TD><TD>128</TD></TR>
</TABLE>

<P>
<HR>
<P>
<A href="http://www.grubbybaby.com/mod_log_mysql/">Return to the mod_log_mysql homepage...</A>
</BODY>
</HTML>