diff options
author | Yoshiki Hayashi <yoshiki@apache.org> | 2002-07-12 13:21:30 +0200 |
---|---|---|
committer | Yoshiki Hayashi <yoshiki@apache.org> | 2002-07-12 13:21:30 +0200 |
commit | 114513bb42ccc0b0cdad045b9527f6ea1f7b4a83 (patch) | |
tree | 992a7200c83f9072a4870fef513cd15153160087 | |
parent | New Japanese translation. (diff) | |
download | apache2-114513bb42ccc0b0cdad045b9527f6ea1f7b4a83.tar.xz apache2-114513bb42ccc0b0cdad045b9527f6ea1f7b4a83.zip |
New Japanese translations.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96026 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | docs/manual/dso.html | 344 | ||||
-rw-r--r-- | docs/manual/dso.html.ja.jis | 321 | ||||
-rw-r--r-- | docs/manual/logs.html | 666 | ||||
-rw-r--r-- | docs/manual/logs.html.ja.jis | 615 |
4 files changed, 936 insertions, 1010 deletions
diff --git a/docs/manual/dso.html b/docs/manual/dso.html deleted file mode 100644 index 41d965d671..0000000000 --- a/docs/manual/dso.html +++ /dev/null @@ -1,344 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta name="generator" content="HTML Tidy, see www.w3.org" /> - - <title>Dynamic Shared Object (DSO) support</title> - </head> - <!-- Background white, links blue (unvisited), navy (visited), red (active) --> - - <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" - vlink="#000080" alink="#FF0000"> - <!--#include virtual="header.html" --> - - <h1 align="center">Dynamic Shared Object (DSO) Support</h1> - - <p>The Apache HTTP Server is a modular program where the - administrator can choose the functionality to include in the - server by selecting a set of modules. The modules can be - statically compiled into the <code>httpd</code> binary when the - server is built. Alternatively, modules can be compiled as - Dynamic Shared Objects (DSOs) that exist separately from the - main <code>httpd</code> binary file. DSO modules may be - compiled at the time the server is built, or they may be - compiled and added at a later time using the Apache Extension - Tool (<a href="programs/apxs.html">apxs</a>).</p> - - <p>This document describes how to use DSO modules as well as - the theory behind their use.</p> - - <ul> - <li><a href="#implementation">Implementation</a></li> - - <li><a href="#usage">Usage Summary</a></li> - - <li><a href="#background">Background</a></li> - - <li><a href="#advantages">Advantages and - Disadvantages</a></li> - </ul> - <hr /> - - <table border="1"> - <tr> - <td valign="top"><strong>Related Modules</strong><br /> - <br /> - <a href="mod/mod_so.html">mod_so</a><br /> - </td> - - <td valign="top"><strong>Related Directives</strong><br /> - <br /> - <a href="mod/mod_so.html#loadmodule">LoadModule</a><br /> - </td> - </tr> - </table> - - <h2><a id="implementation" - name="implementation">Implementation</a></h2> - - <p>The DSO support for loading individual Apache modules is - based on a module named <a - href="mod/mod_so.html"><code>mod_so.c</code></a> which must be - statically compiled into the Apache core. It is the only module - besides <code>core.c</code> which cannot be put into a DSO - itself. Practically all other distributed Apache modules - can then be placed into a DSO by individually enabling the DSO - build for them via <code>configure</code>'s - <code>--enable-<i>module</i>=shared</code> option as disucussed - in the <a href="install.html">install documentation</a>. After - a module is compiled into a DSO named <code>mod_foo.so</code> - you can use <a href="mod/mod_so.html"><code>mod_so</code></a>'s - <a - href="mod/mod_so.html#loadmodule"><code>LoadModule</code></a> - command in your <code>httpd.conf</code> file to load this - module at server startup or restart.</p> - - <p>To simplify this creation of DSO files for Apache modules - (especially for third-party modules) a new support program - named <a href="programs/apxs.html">apxs</a> (<em>APache - eXtenSion</em>) is available. It can be used to build DSO based - modules <em>outside of</em> the Apache source tree. The idea is - simple: When installing Apache the <code>configure</code>'s - <code>make install</code> procedure installs the Apache C - header files and puts the platform-dependent compiler and - linker flags for building DSO files into the <code>apxs</code> - program. This way the user can use <code>apxs</code> to compile - his Apache module sources without the Apache distribution - source tree and without having to fiddle with the - platform-dependent compiler and linker flags for DSO - support.</p> - - <h2><a id="usage" name="usage">Usage Summary</a></h2> - - <p>To give you an overview of the DSO features of Apache 2.0, - here is a short and concise summary:</p> - - <ol> - <li> - Build and install a <em>distributed</em> Apache module, say - <code>mod_foo.c</code>, into its own DSO - <code>mod_foo.so</code>: - - <table bgcolor="#f0f0f0" cellpadding="10"> - <tr> - <td> -<pre> -$ ./configure --prefix=/path/to/install - --enable-foo=shared -$ make install -</pre> - </td> - </tr> - </table> - </li> - - <li> - Build and install a <em>third-party</em> Apache module, say - <code>mod_foo.c</code>, into its own DSO - <code>mod_foo.so</code>: - - <table bgcolor="#f0f0f0" cellpadding="10"> - <tr> - <td> -<pre> -$ ./configure --add-module=module_type:/path/to/3rdparty/mod_foo.c - --enable-foo=shared -$ make install -</pre> - </td> - </tr> - </table> - </li> - - <li> - Configure Apache for <em>later installation</em> of shared - modules: - - <table bgcolor="#f0f0f0" cellpadding="10"> - <tr> - <td> -<pre> -$ ./configure --enable-so -$ make install -</pre> - </td> - </tr> - </table> - </li> - - <li> - Build and install a <em>third-party</em> Apache module, say - <code>mod_foo.c</code>, into its own DSO - <code>mod_foo.so</code> <em>outside of</em> the Apache - source tree using <a href="programs/apxs.html">apxs</a>: - - <table bgcolor="#f0f0f0" cellpadding="10"> - <tr> - <td> -<pre> -$ cd /path/to/3rdparty -$ apxs -c mod_foo.c -$ apxs -i -a -n foo mod_foo.so -</pre> - </td> - </tr> - </table> - </li> - </ol> - - <p>In all cases, once the shared module is compiled, you must - use a <a - href="mod/mod_so.html#loadmodule"><code>LoadModule</code></a> - directive in <code>httpd.conf</code> to tell Apache to activate - the module.</p> - - <h2><a id="background" name="background">Background</a></h2> - - <p>On modern Unix derivatives there exists a nifty mechanism - usually called dynamic linking/loading of <em>Dynamic Shared - Objects</em> (DSO) which provides a way to build a piece of - program code in a special format for loading it at run-time - into the address space of an executable program.</p> - - <p>This loading can usually be done in two ways: Automatically - by a system program called <code>ld.so</code> when an - executable program is started or manually from within the - executing program via a programmatic system interface to the - Unix loader through the system calls - <code>dlopen()/dlsym()</code>.</p> - - <p>In the first way the DSO's are usually called <em>shared - libraries</em> or <em>DSO libraries</em> and named - <code>libfoo.so</code> or <code>libfoo.so.1.2</code>. They - reside in a system directory (usually <code>/usr/lib</code>) - and the link to the executable program is established at - build-time by specifying <code>-lfoo</code> to the linker - command. This hard-codes library references into the executable - program file so that at start-time the Unix loader is able to - locate <code>libfoo.so</code> in <code>/usr/lib</code>, in - paths hard-coded via linker-options like <code>-R</code> or in - paths configured via the environment variable - <code>LD_LIBRARY_PATH</code>. It then resolves any (yet - unresolved) symbols in the executable program which are - available in the DSO.</p> - - <p>Symbols in the executable program are usually not referenced - by the DSO (because it's a reusable library of general code) - and hence no further resolving has to be done. The executable - program has no need to do anything on its own to use the - symbols from the DSO because the complete resolving is done by - the Unix loader. (In fact, the code to invoke - <code>ld.so</code> is part of the run-time startup code which - is linked into every executable program which has been bound - non-static). The advantage of dynamic loading of common library - code is obvious: the library code needs to be stored only once, - in a system library like <code>libc.so</code>, saving disk - space for every program.</p> - - <p>In the second way the DSO's are usually called <em>shared - objects</em> or <em>DSO files</em> and can be named with an - arbitrary extension (although the canonical name is - <code>foo.so</code>). These files usually stay inside a - program-specific directory and there is no automatically - established link to the executable program where they are used. - Instead the executable program manually loads the DSO at - run-time into its address space via <code>dlopen()</code>. At - this time no resolving of symbols from the DSO for the - executable program is done. But instead the Unix loader - automatically resolves any (yet unresolved) symbols in the DSO - from the set of symbols exported by the executable program and - its already loaded DSO libraries (especially all symbols from - the ubiquitous <code>libc.so</code>). This way the DSO gets - knowledge of the executable program's symbol set as if it had - been statically linked with it in the first place.</p> - - <p>Finally, to take advantage of the DSO's API the executable - program has to resolve particular symbols from the DSO via - <code>dlsym()</code> for later use inside dispatch tables - <em>etc.</em> In other words: The executable program has to - manually resolve every symbol it needs to be able to use it. - The advantage of such a mechanism is that optional program - parts need not be loaded (and thus do not spend memory) until - they are needed by the program in question. When required, - these program parts can be loaded dynamically to extend the - base program's functionality.</p> - - <p>Although this DSO mechanism sounds straightforward there is - at least one difficult step here: The resolving of symbols from - the executable program for the DSO when using a DSO to extend a - program (the second way). Why? Because "reverse resolving" DSO - symbols from the executable program's symbol set is against the - library design (where the library has no knowledge about the - programs it is used by) and is neither available under all - platforms nor standardized. In practice the executable - program's global symbols are often not re-exported and thus not - available for use in a DSO. Finding a way to force the linker - to export all global symbols is the main problem one has to - solve when using DSO for extending a program at run-time.</p> - - <p>The shared library approach is the typical one, because it - is what the DSO mechanism was designed for, hence it is used - for nearly all types of libraries the operating system - provides. On the other hand using shared objects for extending - a program is not used by a lot of programs.</p> - - <p>As of 1998 there are only a few software packages available - which use the DSO mechanism to actually extend their - functionality at run-time: Perl 5 (via its XS mechanism and the - DynaLoader module), Netscape Server, <em>etc.</em> Starting - with version 1.3, Apache joined the crew, because Apache - already uses a module concept to extend its functionality and - internally uses a dispatch-list-based approach to link external - modules into the Apache core functionality. So, Apache is - really predestined for using DSO to load its modules at - run-time.</p> - - <h2><a id="advantages" name="advantages">Advantages and - Disadvantages</a></h2> - - <p>The above DSO based features have the following - advantages:</p> - - <ul> - <li>The server package is more flexible at run-time because - the actual server process can be assembled at run-time via <a - href="mod/mod_so.html#loadmodule"><code>LoadModule</code></a> - <code>httpd.conf</code> configuration commands instead of - <code>configure</code> options at build-time. For instance - this way one is able to run different server instances - (standard & SSL version, minimalistic & powered up - version [mod_perl, PHP3], <em>etc.</em>) with only one Apache - installation.</li> - - <li>The server package can be easily extended with - third-party modules even after installation. This is at least - a great benefit for vendor package maintainers who can create - a Apache core package and additional packages containing - extensions like PHP3, mod_perl, mod_fastcgi, - <em>etc.</em></li> - - <li>Easier Apache module prototyping because with the - DSO/<code>apxs</code> pair you can both work outside the - Apache source tree and only need an <code>apxs -i</code> - command followed by an <code>apachectl restart</code> to - bring a new version of your currently developed module into - the running Apache server.</li> - </ul> - - <p>DSO has the following disadvantages:</p> - - <ul> - <li>The DSO mechanism cannot be used on every platform - because not all operating systems support dynamic loading of - code into the address space of a program.</li> - - <li>The server is approximately 20% slower at startup time - because of the symbol resolving overhead the Unix loader now - has to do.</li> - - <li>The server is approximately 5% slower at execution time - under some platforms because position independent code (PIC) - sometimes needs complicated assembler tricks for relative - addressing which are not necessarily as fast as absolute - addressing.</li> - - <li>Because DSO modules cannot be linked against other - DSO-based libraries (<code>ld -lfoo</code>) on all platforms - (for instance a.out-based platforms usually don't provide - this functionality while ELF-based platforms do) you cannot - use the DSO mechanism for all types of modules. Or in other - words, modules compiled as DSO files are restricted to only - use symbols from the Apache core, from the C library - (<code>libc</code>) and all other dynamic or static libraries - used by the Apache core, or from static library archives - (<code>libfoo.a</code>) containing position independent code. - The only chances to use other code is to either make sure the - Apache core itself already contains a reference to it or - loading the code yourself via <code>dlopen()</code>.</li> - </ul> - <!--#include virtual="footer.html" --> - </body> -</html> - diff --git a/docs/manual/dso.html.ja.jis b/docs/manual/dso.html.ja.jis new file mode 100644 index 0000000000..39d5113fd9 --- /dev/null +++ b/docs/manual/dso.html.ja.jis @@ -0,0 +1,321 @@ +<?xml version="1.0" encoding="iso-2022-jp"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + + <title>Dynamic Shared Object (DSO) support</title> + </head> + <!-- English revision: 1.22 --> + <!-- Background white, links blue (unvisited), navy (visited), red (active) --> + + <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" + vlink="#000080" alink="#FF0000"> + <!--#include virtual="header.html" --> + + <h1 align="center">$BF0E*6&M-%*%V%8%'%/%H(B (DSO) $B%5%]!<%H(B</h1> + + <p>Apache HTTP $B%5!<%P$O%b%8%e!<%k2=$5$l$?%W%m%0%i%`$G!"(B + $B4IM}<T$,%b%8%e!<%k$rA*Br$9$k$3$H$G%5!<%P$KAH$_9~$`5!G=$rA*$V$3$H$,$G$-$^$9!#(B + $B%b%8%e!<%k$O%5!<%P$,%S%k%I$5$l$k$H$-$K(B <code>httpd</code> $B%P%$%J%j$K(B + $B@EE*$KAH$_9~$`$3$H$,$G$-$^$9!#$b$7$/$O!"(B<code>httpd</code> $B%P%$%J%j$H$O(B + $BJL$KB8:_$9$kF0E*6&M-%*%V%8%'%/%H(B ($BLuCm(B: Dynamic Shared Object) + (DSO) $B$H$7$F%3%s%Q%$%k$9$k$3$H$b(B + $B$G$-$^$9!#(BDSO $B%b%8%e!<%k$O%5!<%P$,%S%k%I$5$l$k$H$-$K%3%s%Q%$%k$7$?$j!"(B + Apache $B3HD%%D!<%k(B (<a href="programs/apxs.html">apxs</a>) $B$r(B + $B;H$C$F8e$G%3%s%Q%$%k$7$FDI2C$7$?$j$G$-$^$9!#(B</p> + + <p>$B$3$NJ8=q$O(B DSO $B%b%8%e!<%k$N;H$$J}$H!"$=$NO@M}$K$D$$$F(B + $B@bL@$7$^$9!#(B</p> + + <ul> + <li><a href="#implementation">$B<BAu(B</a></li> + + <li><a href="#usage">$B;HMQK!$N35MW(B</a></li> + + <li><a href="#background">$BGX7J(B</a></li> + + <li><a href="#advantages">$BMxE@$H7gE@(B</a></li> + </ul> + <hr /> + + <table border="1"> + <tr> + <td valign="top"><strong>$B4XO"%b%8%e!<%k(B</strong><br /> + <br /> + <a href="mod/mod_so.html">mod_so</a><br /> + </td> + + <td valign="top"><strong>$B4XO"%G%#%l%/%F%#%V(B</strong><br /> + <br /> + <a href="mod/mod_so.html#loadmodule">LoadModule</a><br /> + </td> + </tr> + </table> + + <h2><a id="implementation" + name="implementation">$B<BAu(B</a></h2> + + <p>$B8D!9$N(B Apache $B%b%8%e!<%k$r%m!<%I$9$k$?$a$N(B DSO $B%5%]!<%H$O(B + <a href="mod/mod_so.html"><code>mod_so.c</code></a> $B$H$$$&%b%8%e!<%k$N(B + $B5!G=$K4p$E$$$F$$$^$9!#$3$N%b%8%e!<%k(B $B$O(B Apache $B$N%3%"$K@EE*$KAH$_9~$^$l$F$$$k(B + $BI,MW$,$"$j$^$9!#$=$l$O(B <code>core.c</code> $B0J30$G$O(B DSO $B$K$G$-$J$$M#0l$N(B + $B%b%8%e!<%k$G$9!#;v<B>e!"B>$N$9$Y$F$N(B Apache $B$N%b%8%e!<%k$O!"(B + <a href="install.html">$B%$%s%9%H!<%k$NJ8=q(B</a>$B$G@bL@$5$l$F$$$k$h$&$K!"(B + <code>configure</code> $B$N(B + <code>--enable-<i>module</i>=shared</code> $B%*%W%7%g%s$G$=$l$>$l$r(B + DSO $B%S%k%I$K$9$k$3$H$K$h$j!"(BDSO $B%b%8%e!<%k$K$9$k$3$H$,$G$-$^$9!#(B + <code>mod_foo.so</code> $B$N$h$&$J(B DSO $B$K%b%8%e!<%k$,%3%s%Q%$%k$5$l$l$P!"(B + <code>httpd.conf</code> $B%U%!%$%kCf$G(B + <a href="mod/mod_so.html"><code>mod_so</code></a> $B$N(B + <a href="mod/mod_so.html#loadmodule"><code>LoadModule</code></a> + $B%G%#%l%/%F%#%V$r;H$&$3$H$G%5!<%P$N5/F0$d:F5/F0;~$K$3$N%b%8%e!<%k$r(B + $B%m!<%I$9$k$h$&$K$G$-$^$9!#(B</p> + + <p>Apache $B%b%8%e!<%kMQ$N(B ($BFC$K%5!<%I%Q!<%F%#%b%8%e!<%k$N(B) DSO $B%U%!%$%k$N(B + $B:n@.$r4JC1$K$9$k$?$a$K!"(B<a href="programs/apxs.html">apxs</a> + (<em>APache eXtenSion</em>) $B$H$$$&?7$7$$%5%]!<%H%W%m%0%i%`$,$"$j$^$9!#(B + Apache $B$N%=!<%9%D%j!<$N(B<em>$B30$G(B</em> DSO $B%b%8%e!<%k$r%S%k%I$9$k$?$a$K(B + $B;H$&$3$H$,$G$-$^$9!#H/A[$OC1=c$G$9(B: Apache $B$N%$%s%9%H!<%k;~$N(B + <code>configure</code>$B!"(B<code>make install</code> $B$N$H$-$K(B Apache $B$N(B + C $B%X%C%@$r%$%s%9%H!<%k$7!"(BDSO $B%S%k%IMQ$N%W%i%C%H%U%)!<%`0MB8$N(B + $B%3%s%Q%$%i$H%j%s%+$N%U%i%0$r(B <code>apxs</code> $B%W%m%0%i%`$KDI2C$7$^$9!#(B + $B$3$l$K$h$j!"%f!<%6$,(B Apache $B$NG[I[%=!<%9%D%j!<$J$7$G!"$5$i$K(B + DSO $B%5%]!<%H$N$?$a$N%W%i%C%H%U%)!<%`0MB8$N%3%s%Q%$%i$d%j%s%+$N(B + $B%U%i%0$r$$$8$k$3$H$J$/(B Apache $B$N%b%8%e!<%k$N%=!<%9$r%3%s%Q%$%k(B + $B$G$-$k$h$&$K$J$j$^$9!#(B</p> + + <h2><a id="usage" name="usage">$B;HMQK!$N35MW(B</a></h2> + + <p>Apache 2.0 $B$N(B DSO $B5!G=$N35N,$rCN$k$3$H$,$G$-$k$?$a$N!"(B + $BC;$/4J7i$J35MW$G$9(B:</p> + + <ol> + <li> + <em>$BG[I[$5$l$F$$$k(B</em> Apache $B%b%8%e!<%k!"2>$K(B <code>mod_foo.c</code> + $B$H$7$F!"$=$l$r(B DSO <code>mod_foo.so</code> $B$K%S%k%I!"%$%s%9%H!<%k(B: + + <table bgcolor="#f0f0f0" cellpadding="10"> + <tr> + <td> +<pre> +$ ./configure --prefix=/path/to/install + --enable-foo=shared +$ make install +</pre> + </td> + </tr> + </table> + </li> + + <li> + <em>$B%5!<%I%Q!<%F%#(B</em> Apache $B%b%8%e!<%k!"2>$K(B <code>mod_foo.c</code> + $B$H$7$F!"$=$l$r(B DSO <code>mod_foo.so</code> $B$K%S%k%I!"%$%s%9%H!<%k(B: + + <table bgcolor="#f0f0f0" cellpadding="10"> + <tr> + <td> +<pre> +$ ./configure --add-module=module_type:/path/to/3rdparty/mod_foo.c + --enable-foo=shared +$ make install +</pre> + </td> + </tr> + </table> + </li> + + <li> + $B6&M-%b%8%e!<%k$N(B <em>$B8e!9$N%$%s%9%H!<%k(B</em> $B$N$?$a$K(B + Apache $B$r@_Dj(B: + + <table bgcolor="#f0f0f0" cellpadding="10"> + <tr> + <td> +<pre> +$ ./configure --enable-so +$ make install +</pre> + </td> + </tr> + </table> + </li> + + <li> + <em>$B%5!<%I%Q!<%F%#(B</em> Apache $B%b%8%e!<%k!"2>$K(B <code>mod_foo.c</code> + $B$H$7$F!"$=$l$r(B <a href="programs/apxs.html">apxs</a> $B$r;H$C$F(B + Apache $B%=!<%9%D%j!<$N(B<em>$B30$G(B</em> DSO $B$K%S%k%I!"%$%s%9%H!<%k(B: + + <table bgcolor="#f0f0f0" cellpadding="10"> + <tr> + <td> +<pre> +$ cd /path/to/3rdparty +$ apxs -c mod_foo.c +$ apxs -i -a -n foo mod_foo.so +</pre> + </td> + </tr> + </table> + </li> + </ol> + + <p>$B$I$N>l9g$K$*$$$F$b!"6&M-%b%8%e!<%k$r%3%s%Q%$%k$7$?8e$G!"(B + <code>httpd.conf</code> $B$G(B <a + href="mod/mod_so.html#loadmodule"><code>LoadModule</code></a> + $B%G%#%l%/%F%#%V$r;H$C$F(B Apache $B$,%b%8%e!<%k$r;HMQ$9$k$h$&$K(B + $B$7$J$1$l$P$J$j$^$;$s!#(B</p> + + <h2><a id="background" name="background">$BGX7J(B</a></h2> + + <p>$B:G6a$N(B Unix $B7O$N(B OS $B$K$O(B <em>$BF0E*6&M-%*%V%8%'%/%H(B</em> (DSO) + $B$NF0E*%j%s%/(B/$B%m!<%I$H$$$&5$$N$-$$$?5!9=$,(B + $BB8:_$7$^$9!#$3$l$O!"<B9T;~$K%W%m%0%i%`$N%"%I%l%96u4V$K(B + $B%m!<%I$G$-$k$h$&$JFCJL$J7A<0$G%W%m%0%i%`$r%S%k%I$9$k$3$H$r(B + $B2DG=$K$7$^$9!#(B</p> + + <p>$B$3$N%m!<%I$OFs$D$NJ}K!$G9T$J$&$3$H$,$G$-$^$9(B: $B<B9T%W%m%0%i%`$,(B + $B5/F0$5$l$?$H$-$K(B <code>lod.so</code> $B$H$$$&%7%9%F%`%W%m%0%i%`(B + $B$K$h$j<+F0E*$K9T$J$o$l$kJ}K!$H!"<B9T%W%m%0%i%`Cf$+$i!"%7%9%F%`%3!<%k(B + <code>dlopen()/dlsym()</code> $B$K$h$k(B Unix $B%m!<%@$X$N(B + $B%W%m%0%i%`%7%9%F%`$N%$%s%?%U%'!<%9$r;H$C$F<jF0$G9T$J$&J}K!$H$,(B + $B$"$j$^$9!#(B</p> + + <p>$B:G=i$NJ}K!$G$O(B DSO $B$OIaDL$O(B<em>$B6&M-%i%$%V%i%j(B</em>$B$d(B <em>DSO + $B%i%$%V%i%j(B</em> $B$H8F$P$l$F$$$F!"(BDSO $B$NL>A0$O(B + <code>libfoo.so</code> $B$d(B <code>libfoo.so.1.2</code> $B$N$h$&$K$J$C$F$$$^$9!#(B + $B$3$l$i$O%7%9%F%`%G%#%l%/%H%j(B ($BDL>o(B <code>/usr/lib</code>) $B$KB8:_$7!"(B + $B<B9T%W%m%0%i%`$X$N%j%s%/$O%S%k%I;~$K(B <code>-lfoo</code> $B$r%j%s%+$K(B + $B;XDj$9$k$3$H$G3NN)$5$l$^$9!#$3$l$K$h$j%i%$%V%i%j$X$N;2>H$,<B9T%W%m%0%i%`$N(B + $B%U%!%$%k$K=q$-9~$^$l$F!"5/F0;~$K(B Unix $B$N%m!<%@$,(B <code>/usr/lib</code> $B$d!"(B + $B%j%s%+$N(B <code>-R</code> $B$N$h$&$J%*%W%7%g%s$K$h$j%O!<%I%3!<%I$5$l$?%Q%9!"(B + $B4D6-JQ?t(B <code>LD_LIBRARY_PATH</code> $B$K$h$j@_Dj$5$l$?%Q%9!"$NCf$+$i(B + <code>libfoo.so</code> $B$N>l=j$r8+$D$1$k$3$H$,$G$-$^$9!#$=$l$+$i!"(B + $B<B9T%W%m%0%i%`Cf$N(B ($B$^$@L$2r7h$N(B) $B%7%s%\%k$r(B DSO $B$K$"$k%7%s%\%k$G(B + $B2r7h$7$^$9!#(B</p> + + <p>$BIaDL$O<B9T%W%m%0%i%`Cf$N%7%s%\%k$O(B DSO $B$+$i$O;2>H$5$l$^$;$s(B + (DSO $B$O0lHLE*$J%3!<%I$K$h$k:FMxMQ2DG=$J%i%$%V%i%j$G$9$N$G(B)$B!#(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$N%i%$%V%i%j$G;H$o$l$F$$$^$9!#(B + $B0lJ}!"%W%m%0%i%`$N3HD%$N$?$a$K6&M-%*%V%8%'%/%H$r;HMQ$9$k!"$H$$$&J}$O(B + $B$"$^$j;H$o$l$F$$$^$;$s!#(B</p> + + <p>1998 $BG/$N;~E@$G!"<B9T;~$K<B:]$K5!G=3HD%$N$?$a$K(B DSO $B5!9=$r;H$C$F$$$k(B + $B%=%U%H%&%'%"%Q%C%1!<%8$O>/$7$@$1$G$7$?(B: Perl 5 (XS $B5!9=$H(B DnaLoader $B%b%8%e!<%k(B + $B$K$h$k$b$N(B)$B!"(BNetscape $B%5!<%P(B<em>$B$J$I(B</em>$B$G$9!#(BApache $B$O$9$G$K(B + $B%b%8%e!<%k$N35G0$r;H$C$F5!G=3HD%$r$7$F$$$F!"FbItE*$K%G%#%9%Q%C%A%j%9%H$K(B + $B4p$E$$$?30It%b%8%e!<%k$N(B Apache $B%3%"5!G=$X$N%j%s%/$r9T$J$C$F$$$^$7$?$N$G!"(B + $B%P!<%8%g%s(B 1.3 $B$+$i!"(BApache $B$b(B DSO $B5!9=$r;H$&Cg4V$K$J$j$^$7$?!#(B + Apache $B$O<B9T;~$K(B DSO $B$r;H$C$F%b%8%e!<%k$r%m!<%I$9$k$h$&$K$9$G$K(B + $B1?L?IU$1$i$l$F$$$?$N$G$9!#(B</p> + + <h2><a id="advantages" name="advantages">$BMxE@$H7gE@(B</a></h2> + + <p>$B>e5-$N(B DSO $B$K4p$E$$$?5!G=$O0J2<$NMxE@$,$"$j$^$9(B:</p> + + <ul> + <li>$B<B:]$N%5!<%P%W%m%;%9$rAH$_N)$F$k$?$a$K!"(B + $B%S%k%I;~$K(B <code>configure</code> $B$N%*%W%7%g%s$r;H$&Be$o$j$K(B + $B<B9T;~$K(B <code>httpd.conf</code> $B$N@_DjMQ%3%^%s%I(B <a + href="mod/mod_so.html#loadmodule"><code>LoadModule</code></a> + $B$r;H$&$3$H$,$G$-$^$9$N$G!"%5!<%P%Q%C%1!<%8$N=@Fp@-$,9b$^$j$^$7$?!#(B + $B$?$H$($P!"0l$D$N(B Apache $B$N%$%s%9%H!<%k$+$i(B + $B0c$&9=@.$N%5!<%P(B ($BI8=`HG$H(B SSL $BHG!":G>.9=@.$H3HD%HG(B [mod_perl, PHP3] + <em>$B$J$I(B</em>) $B$r<B9T$9$k$3$H$,$G$-$^$9!#(B</li> + + <li>$B%$%s%9%H!<%k$N8e$G$"$C$F$b!"%5!<%P$N%Q%C%1!<%8$r%5!<%I%Q!<%F%#(B + $B%b%8%e!<%k$G4JC1$K3HD%$G$-$k$h$&$K$J$j$^$7$?!#$3$l$O!"(BApache $B%3%"(B + $B%Q%C%1!<%8$H!"(BPHP3, mod_perl, mod_fastcgi <em>$B$J$I(B</em> $B$NDI2C$N(B + $B%Q%C%1!<%8$r:n@.$G$-$k$N$G!">/$J$/$H$b%Y%s%@$N%Q%C%1!<%84IM}<T$K$H$C$F(B + $BBg$-$JMxE@$,$"$j$^$9!#(B</li> + + <li>Apache $B%b%8%e!<%k$N3+H/$,4JC1$K$J$j$^$9!#(B + $B$3$l$O(B DSO/<code>apxs</code> $B$NAH$_9g$o$;$K$h$j!"(BApache $B%=!<%9%D%j!<$N(B + $B30$G:n6H$G$-!"3+H/Cf$N%b%8%e!<%k$N?7$7$$%P!<%8%g%s$r(B + $B<B9TCf$N(B Apache $B%5!<%P$KAH$_9~$`$?$a$K(B <code>apxs -i</code> $B$H(B + <code>apachectl restart</code> $B$r9T$J$&$@$1$GNI$/$J$k$+$i$G$9!#(B</li> + </ul> + + <p>DSO $B$K$O0J2<$N7gE@$,$"$j$^$9(B:</p> + + <ul> + <li>$B$9$Y$F$N%*%Z%l!<%F%#%s%0%7%9%F%`$,%W%m%0%i%`$N%"%I%l%96u4V$K(B + $B%3!<%I$rF0E*%m!<%I$9$k$3$H$r%5%]!<%H$7$F$$$k$o$G$O$J$$$N$G!"(B + $B%W%i%C%H%U%)!<%`$K$h$C$F$O(B DSO $B5!9=$O;H$($^$;$s!#(B</li> + + <li>Unix $B$N%m!<%@$,%7%s%\%k$N2r7h$r$9$kI,MW$,$G$-$?$N$G!"(B + $B$=$N%*!<%P%X%C%I$K$h$j%5!<%P$N5/F0;~4V$,Ls(B 20% $BCY$/$J$C$F$$$^$9!#(B</li> + + <li>$B0LCVHs0MB8%3!<%I(B (PIC) ($BLuCm(B position independent code) $B$O(B + $BAjBP%"%I%l%9$N$?$a$KJ#;($J%"%;%s%V%i$N%H%j%C%/$,I,MW$J$3$H$,$"$j!"(B + $B$=$l$OI,$:$7$b@dBP%"%I%l%9$HF1$8$/$i$$$NB.EY$,$G$k$o$1$G$O$"$j$^$;$s$N$G!"(B + $B%W%i%C%H%U%)!<%`$K$h$C$F$O%5!<%P$N<B9TB.EY$,Ls(B 5% $BCY$/$J$j$^$9!#(B</li> + + <li>DSO $B%b%8%e!<%k$O$9$Y$F$N%W%i%C%H%U%)!<%`$GB>$N(B DSO $B$K4p$E$$$?(B + $B%i%$%V%i%j$KBP$7$F%j%s%/$G$-$k(B (<code>ld -lfoo</code>) + $B$H$$$&$o$1$G$O$"$j$^$;$s$N$G(B ($B$?$H$($P!"(Ba.out $B$N%W%i%C%H%U%)!<%`$G$O(B + $B$3$N5!G=$O$"$j$^$;$s$,!"(BELF $B$N%W%i%C%H%U%)!<%`$K$O$"$j$^$9(B)$B!"(B + $B$9$Y$F$N<oN`$N%b%8%e!<%k$K(B DSO $B5!9=$r;H$($k$o$1$G$O$"$j$^$;$s!#(B + $B8@$$49$($k$H!"(BDSO $B%U%!%$%k$H$7$F%3%s%Q%$%k$5$l$?%b%8%e!<%k$N(B + $B;H$($k%7%s%\%k$O!"(B + Apache $B$N%3%"$N%7%s%\%k!"(BC $B%i%$%V%i%j(B (<code>libc</code>) $B$H(B + Apache $B%3%"$,;H$C$F$$$kB>$N$9$Y$F$N@EE*$J%i%$%V%i%j$HF0E*%i%$%V%i%j$N(B + $B%7%s%\%k!"(BPIC $B$K$h$k@EE*$J%i%$%V%i%j(B (<code>libfoo.a</code>) $B$N(B + $B%7%s%\%k$N$_$K@)8B$5$l$^$9!#$=$NB>$N%3!<%I$r;H$&J}K!$O!"(B + Apache $B%3%"<+?H$,$9$G$K$=$N%3!<%I$X$N;2>H$,$"$k$h$&$K$9$k$+!"(B + <code>dlopen ()</code> $B$r;H$C$F%3!<%I$r<+J,<+?H$G%m!<%I$9$k$+$N(B + $B$I$A$i$+$7$+$"$j$^$;$s!#(B</li> + </ul> + <!--#include virtual="footer.html" --> + </body> +</html> + diff --git a/docs/manual/logs.html b/docs/manual/logs.html deleted file mode 100644 index 49ccee903a..0000000000 --- a/docs/manual/logs.html +++ /dev/null @@ -1,666 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta name="generator" content="HTML Tidy, see www.w3.org" /> - - <title>Log Files - Apache HTTP Server</title> - </head> - <!-- Background white, links blue (unvisited), navy (visited), red (active) --> - - <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" - vlink="#000080" alink="#FF0000"> - <!--#include virtual="header.html" --> - - <h1 align="center">Log Files</h1> - - <p>In order to effectively manage a web server, it is necessary - to get feedback about the activity and performance of the - server as well as any problems that may be occuring. The Apache - HTTP Server provides very comprehensive and flexible logging - capabilities. This document describes how to configure its - logging capabilities, and how to understand what the logs - contain.</p> - - <ul> - <li><a href="#security">Security Warning</a></li> - - <li><a href="#errorlog">Error Log</a></li> - - <li> - <a href="#accesslog">Access Log</a> - - <ul> - <li><a href="#common">Common Log Format</a></li> - - <li><a href="#combined">Combined Log Format</a></li> - - <li><a href="#multiple">Multiple Access Logs</a></li> - - <li><a href="#conditional">Conditional Logging</a></li> - </ul> - </li> - - <li><a href="#rotation">Log Rotation</a></li> - - <li><a href="#piped">Piped Logs</a></li> - - <li><a href="#virtualhosts">Virtual Hosts</a></li> - - <li> - <a href="#other">Other Log Files</a> - - <ul> - <li><a href="#pidfile">PID File</a></li> - - <li><a href="#scriptlog">Script Log</a></li> - - <li><a href="#rewritelog">Rewrite Log</a></li> - </ul> - </li> - </ul> - <hr /> - - <h2><a id="security" name="security">Security Warning</a></h2> - - <p>Anyone who can write to the directory where Apache is - writing a log file can almost certainly gain access to the uid - that the server is started as, which is normally root. Do - <em>NOT</em> give people write access to the directory the logs - are stored in without being aware of the consequences; see the - <a href="misc/security_tips.html">security tips</a> document - for details.</p> - - <p>In addition, log files may contain information supplied - directly by the client, without escaping. Therefore, it is - possible for malicious clients to insert control-characters in - the log files, so care must be taken in dealing with raw - logs.</p> - <hr /> - - <h2><a id="errorlog" name="errorlog">Error Log</a></h2> - - <table border="1"> - <tr> - <td valign="top"><strong>Related Directives</strong><br /> - <br /> - <a href="mod/core.html#errorlog">ErrorLog</a><br /> - <a href="mod/core.html#loglevel">LogLevel</a> </td> - </tr> - </table> - - <p>The server error log, whose name and location is set by the - <a href="mod/core.html#errorlog">ErrorLog</a> directive, is the - most important log file. This is the place where Apache httpd - will send diagnostic information and record any errors that it - encounters in processing requests. It is the first place to - look when a problem occurs with starting the server or with the - operation of the server, since it will often contain details of - what went wrong and how to fix it.</p> - - <p>The error log is usually written to a file (typically - <code>error_log</code> on unix systems and - <code>error.log</code> on Windows and OS/2). On unix systems it - is also possible to have the server send errors to - <code>syslog</code> or <a href="#piped">pipe them to a - program</a>.</p> - - <p>The format of the error log is relatively free-form and - descriptive. But there is certain information that is contained - in most error log entries. For example, here is a typical - message.</p> - - <blockquote> - <code>[Wed Oct 11 14:32:52 2000] [error] [client 127.0.0.1] - client denied by server configuration: - /export/home/live/ap/htdocs/test</code> - </blockquote> - - <p>The first item in the log entry is the date and time of the - message. The second entry lists the severity of the error being - reported. The <a href="mod/core.html#loglevel">LogLevel</a> - directive is used to control the types of errors that are sent - to the error log by restricting the severity level. The third - entry gives the IP address of the client that generated the - error. Beyond that is the message itself, which in this case - indicates that the server has been configured to deny the - client access. The server reports the file-system path (as - opposed to the web path) of the requested document.</p> - - <p>A very wide variety of different messages can appear in the - error log. Most look similar to the example above. The error - log will also contain debugging output from CGI scripts. Any - information written to <code>stderr</code> by a CGI script will - be copied directly to the error log.</p> - - <p>It is not possible to customize the error log by adding or - removing information. However, error log entries dealing with - particular requests have corresponding entries in the <a - href="#accesslog">access log</a>. For example, the above example - entry corresponds to an access log entry with status code 403. - Since it is possible to customize the access log, you can - obtain more information about error conditions using that log - file.</p> - - <p>During testing, it is often useful to continuously monitor - the error log for any problems. On unix systems, you can - accomplish this using:</p> - - <blockquote> - <code>tail -f error_log</code> - </blockquote> - <hr /> - - <h2><a id="accesslog" name="accesslog">Access Log</a></h2> - - <table border="1"> - <tr> - <td valign="top"><strong>Related Modules</strong><br /> - <br /> - <a href="mod/mod_log_config.html">mod_log_config</a><br /> - </td> - - <td valign="top"><strong>Related Directives</strong><br /> - <br /> - <a - href="mod/mod_log_config.html#customlog">CustomLog</a><br /> - <a - href="mod/mod_log_config.html#logformat">LogFormat</a><br /> - <a href="mod/mod_setenvif.html#setenvif">SetEnvIf</a> - </td> - </tr> - </table> - - <p>The server access log records all requests processed by the - server. The location and content of the access log are - controlled by the <a - href="mod/mod_log_config.html#customlog">CustomLog</a> - directive. The <a - href="mod/mod_log_config.html#logformat">LogFormat</a> - directive can be used to simplify the selection of the contents - of the logs. This section describes how to configure the server - to record information in the access log.</p> - - <p>Of course, storing the information in the access log is only - the start of log management. The next step is to analyze this - information to produce useful statistics. Log analysis in - general is beyond the scope of this document, and not really - part of the job of the web server itself. For more information - about this topic, and for applications which perform log - analysis, check the <a - href="http://dmoz.org/Computers/Software/Internet/Site_Management/Log_analysis/"> - Open Directory</a> or <a - href="http://dir.yahoo.com/Computers_and_Internet/Software/Internet/World_Wide_Web/Servers/Log_Analysis_Tools/"> - Yahoo</a>.</p> - - <p>Various versions of Apache httpd have used other modules and - directives to control access logging, including - mod_log_referer, mod_log_agent, and the - <code>TransferLog</code> directive. The <code>CustomLog</code> - directive now subsumes the functionality of all the older - directives.</p> - - <p>The format of the access log is highly configurable. The - format is specified using a <a - href="mod/mod_log_config.html#format">format string</a> that - looks much like a C-style printf(1) format string. Some - examples are presented in the next sections. For a complete - list of the possible contents of the format string, see the <a - href="mod/mod_log_config.html">mod_log_config - documentation</a>.</p> - - <h3><a id="common" name="common">Common Log Format</a></h3> - - <p>A typical configuration for the access log might look as - follows.</p> - - <blockquote> - <code>LogFormat "%h %l %u %t \"%r\" %>s %b" common<br /> - CustomLog logs/access_log common</code> - </blockquote> - - <p>This defines the <em>nickname</em> <code>common</code> and - associates it with a particular log format string. The format - string consists of percent directives, each of which tell the - server to log a particular piece of information. Literal - characters may also be placed in the format string and will be - copied directly into the log output. The quote character - (<code>"</code>) must be escaped by placing a back-slash before - it to prevent it from being interpreted as the end of the - format string. The format string may also contain the special - control characters "<code>\n</code>" for new-line and - "<code>\t</code>" for tab.</p> - - <p>The <code>CustomLog</code> directive sets up a new log file - using the defined <em>nickname</em>. The filename for the - access log is relative to the <a - href="mod/core.html#serverroot">ServerRoot</a> unless it begins - with a slash.</p> - - <p>The above configuration will write log entries in a format - known as the Common Log Format (CLF). This standard format can - be produced by many different web servers and read by many log - analysis programs. The log file entries produced in CLF will - look something like this:</p> - - <blockquote> - <code>127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET - /apache_pb.gif HTTP/1.0" 200 2326</code> - </blockquote> - - <p>Each part of this log entry is described below.</p> - - <dl> - <dt><code>127.0.0.1</code> (<code>%h</code>)</dt> - - <dd>This is the IP address of the client (remote host) which - made the request to the server. If <a - href="mod/core.html#hostnamelookups">HostnameLookups</a> is - set to <code>On</code>, then the server will try to determine - the hostname and log it in place of the IP address. However, - this configuration is not recommended since it can - significantly slow the server. Instead, it is best to use a - log post-processor such as <a - href="programs/logresolve.html">logresolve</a> to determine - the hostnames. The IP address reported here is not - necessarily the address of the machine at which the user is - sitting. If a proxy server exists between the user and the - server, this address will be the address of the proxy, rather - than the originating machine.</dd> - - <dt><code>-</code> (<code>%l</code>)</dt> - - <dd>The "hyphen" in the output indicates that the requested - piece of information is not available. In this case, the - information that is not available is the RFC 1413 identity of - the client determined by <code>identd</code> on the clients - machine. This information is highly unreliable and should - almost never be used except on tightly controlled internal - networks. Apache httpd will not even attempt to determine - this information unless <a - href="mod/core.html#identitycheck">IdentityCheck</a> is set - to <code>On</code>.</dd> - - <dt><code>frank</code> (<code>%u</code>)</dt> - - <dd>This is the userid of the person requesting the document - as determined by HTTP authentication. The same value is - typically provided to CGI scripts in the - <code>REMOTE_USER</code> environment variable. If the status - code for the request (see below) is 401, then this value - should not be trusted because the user is not yet - authenticated. If the document is not password protected, - this entry will be "<code>-</code>" just like the previous - one.</dd> - - <dt><code>[10/Oct/2000:13:55:36 -0700]</code> - (<code>%t</code>)</dt> - - <dd> - The time that the server finished processing the request. - The format is: - - <blockquote> - <code>[day/month/year:hour:minute:second zone]<br /> - day = 2*digit<br /> - month = 3*letter<br /> - year = 4*digit<br /> - hour = 2*digit<br /> - minute = 2*digit<br /> - second = 2*digit<br /> - zone = (`+' | `-') 4*digit</code> - </blockquote> - It is possible to have the time displayed in another format - by specifying <code>%{format}t</code> in the log format - string, where <code>format</code> is as in - <code>strftime(3)</code> from the C standard library. - </dd> - - <dt><code>"GET /apache_pb.gif HTTP/1.0"</code> - (<code>\"%r\"</code>)</dt> - - <dd>The request line from the client is given in double - quotes. The request line contains a great deal of useful - information. First, the method used by the client is - <code>GET</code>. Second, the client requested the resource - <code>/apache_pb.gif</code>, and third, the client used the - protocol <code>HTTP/1.0</code>. It is also possible to log - one or more parts of the request line independently. For - example, the format string "<code>%m %U%q %H</code>" will log - the method, path, query-string, and protocol, resulting in - exactly the same output as "<code>%r</code>".</dd> - - <dt><code>200</code> (<code>%>s</code>)</dt> - - <dd>This is the status code that the server sends back to the - client. This information is very valuable, because it reveals - whether the request resulted in a successful response (codes - beginning in 2), a redirection (codes beginning in 3), an - error caused by the client (codes beginning in 4), or an - error in the server (codes beginning in 5). The full list of - possible status codes can be found in the <a - href="http://www.w3.org/Protocols/rfc2616/rfc2616.txt">HTTP - specification</a> (RFC2616 section 10).</dd> - - <dt><code>2326</code> (<code>%b</code>)</dt> - - <dd>The last entry indicates the size of the object returned - to the client, not including the response headers. If no - content was returned to the client, this value will be - "<code>-</code>". To log "<code>0</code>" for no content, use - <code>%B</code> instead.</dd> - </dl> - - <h4><a id="combined" name="combined">Combined Log - Format</a></h4> - - <p>Another commonly used format string is called the Combined - Log Format. It can be used as follows.</p> - - <blockquote> - <code>LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" - \"%{User-agent}i\"" combined<br /> - CustomLog log/acces_log combined</code> - </blockquote> - - <p>This format is exactly the same as the Common Log Format, - with the addition of two more fields. Each of the additional - fields uses the percent-directive - <code>%{<em>header</em>}i</code>, where <em>header</em> can be - any HTTP request header. The access log under this format will - look like:</p> - - <blockquote> - <code>127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET - /apache_pb.gif HTTP/1.0" 200 2326 - "http://www.example.com/start.html" "Mozilla/4.08 [en] - (Win98; I ;Nav)"</code> - </blockquote> - - <p>The additional fields are:</p> - - <dl> - <dt><code>"http://www.example.com/start.html"</code> - (<code>\"%{Referer}i\"</code>)</dt> - - <dd>The "Referer" (sic) HTTP request header. This gives the - site that the client reports having been referred from. (This - should be the page that links to or includes - <code>/apache_pb.gif</code>).</dd> - - <dt><code>"Mozilla/4.08 [en] (Win98; I ;Nav)"</code> - (<code>\"%{User-agent}i\"</code>)</dt> - - <dd>The User-Agent HTTP request header. This is the - identifying information that the client browser reports about - itself.</dd> - </dl> - - <h3><a id="multiple" name="multiple">Multiple Access - Logs</a></h3> - - <p>Multiple access logs can be created simply by specifying - multiple <code>CustomLog</code> directives in the configuration - file. For example, the following directives will create three - access logs. The first contains the basic CLF information, - while the second and third contain referer and browser - information. The last two <code>CustomLog</code> lines show how - to mimic the effects of the <code>ReferLog</code> and - <code>AgentLog</code> directives.</p> - - <blockquote> - <code>LogFormat "%h %l %u %t \"%r\" %>s %b" common<br /> - CustomLog logs/access_log common<br /> - CustomLog logs/referer_log "%{Referer}i -> %U"<br /> - CustomLog logs/agent_log "%{User-agent}i"</code> - </blockquote> - - <p>This example also shows that it is not necessary to define a - nickname with the <code>LogFormat</code> directive. Instead, - the log format can be specified directly in the - <code>CustomLog</code> directive.</p> - - <h3><a id="conditional" name="conditional">Conditional - Logging</a></h3> - - <p>There are times when it is convenient to exclude certain - entries from the access logs based on characteristics of the - client request. This is easily accomplished with the help of <a - href="env.html">environment variables</a>. First, an - environment variable must be set to indicate that the request - meets certain conditions. This is usually accomplished with <a - href="mod/mod_setenvif.html#setenvif">SetEnvIf</a>. Then the - <code>env=</code> clause of the <code>CustomLog</code> - directive is used to include or exclude requests where the - environment variable is set. Some examples:</p> - - <blockquote> - <code># Mark requests from the loop-back interface<br /> - SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog<br /> - # Mark requests for the robots.txt file<br /> - SetEnvIf Request_URI "^/robots\.txt$" dontlog<br /> - # Log what remains<br /> - CustomLog logs/access_log common env=!dontlog</code> - </blockquote> - - <p>As another example, consider logging requests from - english-speakers to one log file, and non-english speakers to a - different log file.</p> - - <blockquote> - <code>SetEnvIf Accept-Language "en" english<br /> - CustomLog logs/english_log common env=english<br /> - CustomLog logs/non_english_log common env=!english</code> - </blockquote> - - <p>Although we have just shown that conditional logging is very - powerful and flexibly, it is not the only way to control the - contents of the logs. Log files are more useful when they - contain a complete record of server activity. It is often - easier to simply post-process the log files to remove requests - that you do not want to consider.</p> - <hr /> - - <h2><a id="rotation" name="rotation">Log Rotation</a></h2> - - <p>On even a moderately busy server, the quantity of - information stored in the log files is very large. The access - log file typically grows 1 MB or more per 10,000 requests. It - will consequently be necessary to periodically rotate the log - files by moving or deleting the existing logs. This cannot be - done while the server is running, because Apache will continue - writing to the old log file as long as it holds the file open. - Instead, the server must be <a - href="stopping.html">restarted</a> after the log files are - moved or deleted so that it will open new log files.</p> - - <p>By using a <em>graceful</em> restart, the server can be - instructed to open new log files without losing any existing or - pending connections from clients. However, in order to - accomplish this, the server must continue to write to the old - log files while it finishes serving old requests. It is - therefore necessary to wait for some time after the restart - before doing any processing on the log files. A typical - scenario that simply rotates the logs and compresses the old - logs to save space is:</p> - - <blockquote> - <code>mv access_log access_log.old<br /> - mv error_log error_log.old<br /> - apachectl graceful<br /> - sleep 600<br /> - gzip access_log.old error_log.old</code> - </blockquote> - - <p>Another way to perform log rotation is using <a - href="#piped">piped logs</a> as discussed in the next - section.</p> - <hr /> - - <h2><a id="piped" name="piped">Piped Logs</a></h2> - - <p>Apache httpd is capable of writing error and access log - files through a pipe to another process, rather than directly - to a file. This capability dramatically increases the - flexibility of logging, without adding code to the main server. - In order to write logs to a pipe, simply replace the filename - with the pipe character "<code>|</code>", followed by the name - of the executable which should accept log entries on its - standard input. Apache will start the piped-log process when - the server starts, and will restart it if it crashes while the - server is running. (This last feature is why we can refer to - this technique as "reliable piped logging".)</p> - - <p>Piped log processes are spawned by the parent Apache httpd - process, and inherit the userid of that process. This means - that piped log programs usually run as root. It is therefore - very important to keep the programs simple and secure.</p> - - <p>Some simple examples using piped logs:</p> - - <blockquote> - <code># compressed logs<br /> - CustomLog "|/usr/bin/gzip -c >> - /var/log/access_log.gz" common<br /> - # almost-real-time name resolution<br /> - CustomLog "|/usr/local/apache/bin/logresolve >> - /var/log/access_log" common</code> - </blockquote> - - <p>Notice that quotes are used to enclose the entire command - that will be called for the pipe. Although these examples are - for the access log, the same technique can be used for the - error log.</p> - - <p>One important use of piped logs is to allow log rotation - without having to restart the server. The Apache HTTP Server - includes a simple program called <a - href="programs/rotatelogs.html">rotatelogs</a> for this - purpose. For example, to rotate the logs every 24 hours, you - can use:</p> - - <blockquote> - <code>CustomLog "|/usr/local/apache/bin/rotatelogs - /var/log/access_log 86400" common</code> - </blockquote> - - <p>A similar, but much more flexible log rotation program - called <a href="http://www.cronolog.org/">cronolog</a> - is available at an external site.</p> - - <p>As with conditional logging, piped logs are a very powerful - tool, but they should not be used where a simpler solution like - off-line post-processing is available.</p> - <hr /> - - <h2><a id="virtualhosts" name="virtualhosts">Virtual - Hosts</a></h2> - - <p>When running a server with many <a href="vhosts/">virtual - hosts</a>, there are several options for dealing with log - files. First, it is possible to use logs exactly as in a - single-host server. Simply by placing the logging directives - outside the <code><VirtualHost></code> sections in the - main server context, it is possible to log all requests in the - same access log and error log. This technique does not allow - for easy collection of statistics on individual virtual - hosts.</p> - - <p>If <code>CustomLog</code> or <code>ErrorLog</code> - directives are placed inside a <code><VirtualHost></code> - section, all requests or errors for that virtual host will be - logged only to the specified file. Any virtual host which does - not have logging directives will still have its requests sent - to the main server logs. This technique is very useful for a - small number of virtual hosts, but if the number of hosts is - very large, it can be complicated to manage. In addition, it - can often create problems with <a - href="vhosts/fd-limits.html">insufficient file - descriptors</a>.</p> - - <p>For the access log, there is a very good compromise. By - adding information on the virtual host to the log format - string, it is possible to log all hosts to the same log, and - later split the log into individual files. For example, - consider the following directives.</p> - - <blockquote> - <code>LogFormat "%v %l %u %t \"%r\" %>s %b" - comonvhost<br /> - CustomLog logs/access_log comonvhost</code> - </blockquote> - - <p>The <code>%v</code> is used to log the name of the virtual - host that is serving the request. Then a program like <a - href="programs/other.html">split-logfile</a> can be used to - post-process the access log in order to split it into one file - per virtual host.</p> - - <p>Unfortunately, no similar technique is available for the - error log, so you must choose between mixing all virtual hosts - in the same error log and using one error log per virtual - host.</p> - <hr /> - - <h2><a id="other" name="other">Other Log Files</a></h2> - - <table border="1"> - <tr> - <td valign="top"><strong>Related Modules</strong><br /> - <br /> - <a href="mod/mod_cgi.html">mod_cgi</a><br /> - <a href="mod/mod_rewrite.html">mod_rewrite</a> </td> - - <td valign="top"><strong>Related Directives</strong><br /> - <br /> - <a href="mod/core.html#pidfile">PidFile</a><br /> - <a - href="mod/mod_rewrite.html#RewriteLog">RewriteLog</a><br /> - <a - href="mod/mod_rewrite.html#RewriteLogLevel">RewriteLogLevel</a><br /> - <a href="mod/mod_cgi.html#scriptlog">ScriptLog</a><br /> - <a - href="mod/mod_cgi.html#scriptloglength">ScriptLogLength</a><br /> - <a - href="mod/mod_cgi.html#scriptlogbuffer">ScriptLogBuffer</a> - </td> - </tr> - </table> - - <h3><a id="pidfile" name="pidfile">PID File</a></h3> - - <p>On startup, Apache httpd saves the process id of the parent - httpd process to the file <code>logs/httpd.pid</code>. This - filename can be changed with the <a - href="mod/core.html#pidfile">PidFile</a> directive. The - process-id is for use by the administrator in restarting and - terminating the daemon by sending signals to the parent - process; on Windows, use the -k command line option instead. - For more information see the <a href="stopping.html">Stopping - and Restarting</a> page.</p> - - <h3><a id="scriptlog" name="scriptlog">Script Log</a></h3> - - <p>In order to aid in debugging, the <a - href="mod/mod_cgi.html#scriptlog">ScriptLog</a> directive - allows you to record the input to and output from CGI scripts. - This should only be used in testing - not for live servers. - More information is available in the <a - href="mod/mod_cgi.html">mod_cgi documentation</a>.</p> - - <h3><a id="rewritelog" name="rewritelog">Rewrite Log</a></h3> - - <p>When using the powerful and complex features of <a - href="mod/mod_rewrite.html">mod_rewrite</a>, it is almost - always necessary to use the <a - href="mod/mod_rewrite.html#RewriteLog">RewriteLog</a> to help - in debugging. This log file produces a detailed analysis of how - the rewriting engine transforms requests. The level of detail - is controlled by the <a - href="mod/mod_rewrite.html#RewriteLogLevel">RewriteLogLevel</a> - directive.</p> - <!--#include virtual="footer.html" --> - </body> -</html> - diff --git a/docs/manual/logs.html.ja.jis b/docs/manual/logs.html.ja.jis new file mode 100644 index 0000000000..6afe4d74c4 --- /dev/null +++ b/docs/manual/logs.html.ja.jis @@ -0,0 +1,615 @@ +<?xml version="1.0" encoding="iso-2022-jp"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + + <title>Log Files - Apache HTTP Server</title> + </head> + <!-- English revision: 1.9 --> + <!-- Background white, links blue (unvisited), navy (visited), red (active) --> + + <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" + vlink="#000080" alink="#FF0000"> + <!--#include virtual="header.html" --> + + <h1 align="center">$B%m%0%U%!%$%k(B</h1> + + <p>$B%&%'%V%5!<%P$r8z2LE*$K4IM}$9$k$?$a$K$O!"%5!<%P$N3hF0$d%Q%U%)!<%^%s%9!"(B + $B:#H/@8$7$F$$$k$+$b$7$l$J$$LdBj$K4X$9$k%U%#!<%I%P%C%/$rF@$k$3$H$,I,MW$G$9!#(B + Apache HTTP $B%5!<%P$K$OHs>o$KJq3gE*$G=@Fp$J%m%.%s%05!G=$,$"$j$^$9!#(B + $B$3$NJ8=q$O%m%.%s%05!G=$N@_Dj$N;EJ}$H!"%m%0$K2?$,=q$+$l$F$$$k$+$r(B + $BM}2r$9$k$?$a$NJ}K!$r@bL@$7$^$9!#(B</p> + + <ul> + <li><a href="#security">$B%;%-%e%j%F%#$K4X$9$k7Y9p(B</a></li> + + <li><a href="#errorlog">$B%(%i!<%m%0(B</a></li> + + <li> + <a href="#accesslog">$B%"%/%;%9%m%0(B</a> + + <ul> + <li><a href="#common">Common Log Format</a></li> + + <li><a href="#combined">Combined Log Format</a></li> + + <li><a href="#multiple">$BJ#?t$N%"%/%;%9%m%0(B</a></li> + + <li><a href="#conditional">$B>r7oIU$-%m%.%s%0(B</a></li> + </ul> + </li> + + <li><a href="#rotation">$B%m%0$N8rBX(B</a></li> + + <li><a href="#piped">$B%Q%$%W7PM3$N%m%0(B</a></li> + + <li><a href="#virtualhosts">$B%P!<%A%c%k%[%9%H(B</a></li> + + <li> + <a href="#other">$BB>$N%m%0%U%!%$%k(B</a> + + <ul> + <li><a href="#pidfile">PID $B%U%!%$%k(B</a></li> + + <li><a href="#scriptlog">$B%9%/%j%W%H%m%0(B</a></li> + + <li><a href="#rewritelog">$B%j%i%$%H%m%0(B</a></li> + </ul> + </li> + </ul> + <hr /> + + <h2><a id="security" name="security">$B%;%-%e%j%F%#$K4X$9$k7Y9p(B</a></h2> + + <p>Apache $B$,%m%0%U%!%$%k$r=q$$$F$$$k%G%#%l%/%H%j$K=q$-9~$a$k?M$O!"(B + $B$[$\3N<B$K%5!<%P$,5/F0$5$l$?(B uid $B$X$N%"%/%;%9$r<j$KF~$l$k$3$H$,$G$-$^$9!#(B + $B$=$7$F!"$=$l$ODL>o$O(B root $B%f!<%6$G$9!#(B + $B$A$c$s$H7k2L$r9M$($k$3$H$J$/!"$=$N%G%#%l%/%H%j$X$N(B + $B=q$-9~$_8"8B$rM?$((B<em>$B$J$$(B</em>$B$G$/$@$5$$!#>\$7$/$O(B + <a href="misc/security_tips.html">$B%;%-%e%j%F%#$N$3$D(B</a>$B$NJ8=q$r(B + $BFI$s$G$/$@$5$$!#(B</p> + + <p>$B2C$($F!"%m%0%U%!%$%k$K$O%/%i%$%"%s%H$+$i$N>pJs$,$=$N$^$^!"(B + $B%(%9%1!<%W$5$l$k$3$H$J$/=q$+$l$F$$$^$9!#$G$9$+$i!"0-0U$N$"$k(B + $B%/%i%$%"%s%H$,%m%0%U%!%$%k$K@)8fJ8;z$rA^F~$9$k$3$H$,$G$-$^$9!#(B + $B@8$N%m%0$r07$&$H$-$OCm0U$7$F$/$@$5$$!#(B</p> + <hr /> + + <h2><a id="errorlog" name="errorlog">$B%(%i!<%m%0(B</a></h2> + + <table border="1"> + <tr> + <td valign="top"><strong>$B4XO"%G%#%l%/%F%#%V(B</strong><br /> + <br /> + <a href="mod/core.html#errorlog">ErrorLog</a><br /> + <a href="mod/core.html#loglevel">LogLevel</a> </td> + </tr> + </table> + + <p><a href="mod/core.html#errorlog">ErrorLog</a> $B%G%#%l%/%F%#%V$K$h$j(B + $BL>A0$H>l=j$,7h$^$k%5!<%P$N%(%i!<%m%0$O!"0lHV=EMW$J%m%0%U%!%$%k$G$9!#(B + Apache $B$N?GCG>pJs$O$3$3$KAw$i$l!"%j%/%(%9%H$r=hM}$7$F$$$k$H$-$K(B + $BH/@8$7$?%(%i!<$O$9$Y$F$3$3$K5-O?$5$l$^$9!#%5!<%P$r5/F0$7$?$H$-$d!"(B + $B%5!<%P$NF0:n$KLdBj$,5/$3$C$?$H$-$O!"0lHV:G=i$KD4$Y$k$Y$-(B + $B$H$3$m$G$9!#4V0c$$$N>\:Y$d=$@5J}K!$,$=$3$K=q$+$l$F$$$k$3$H$,(B + $B$h$/$"$j$^$9!#(B</p> + + <p>$B%(%i!<%m%0$OIaDL$O%U%!%$%k$K=q$+$l$^$9(B ($BDL>o(B unix $B%7%9%F%`$G$O(B + <code>error_log</code>$B!"(BWindows $B$H(B OS/2 $B$G$O(B <code>error.log</code>)$B!#(B + Unix $B%7%9%F%`$G$O%(%i!<$r(B <code>syslog</code> $B$d(B + <a href="#piped">$B%Q%$%W$G%W%m%0%i%`$KAw$k(B</a> $B$3$H$,$G$-$^$9!#(B</p> + + <p>$B%(%i!<%m%0$N=q<0$OHf3SE*<+M3EY$N9b$$$b$N$G!"@bL@E*$K=q$+$l$F$$$^$9!#(B + $B$?$@$7!"$$$/$D$+$N>pJs$O$[$H$s$I$N%(%i!<%m%0$N%(%s%H%j$K$"$j$^$9!#(B + $BNc$($P!"BeI=E*$J$b$N$K<!$N$h$&$J%a%C%;!<%8$,$"$j$^$9!#(B</p> + + <blockquote> + <code>[Wed Oct 11 14:32:52 2000] [error] [client 127.0.0.1] + client denied by server configuration: + /export/home/live/ap/htdocs/test</code> + </blockquote> + + <p>$B%m%0%(%s%H%j$N:G=i$N9`L\$O%a%C%;!<%8$NF|IU$H;~9o$G$9!#(B + $BFs$D$a$N9`L\$OJs9p$5$l$F$$$k%(%i!<$N=EMWEY$G$9!#(B + <a href="mod/core.html#loglevel">LogLevel</a> $B$G=EMWEY$N%l%Y%k$r(B + $B@)8B$9$k$3$H$K$h$j%(%i!<%m%0$KAw$i$l$k%(%i!<$N<oN`$r@)8f$9$k$3$H$,(B + $B$G$-$^$9!#;0$DL\$N9`L\$O%(%i!<$rH/@8$5$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$r8+$k$?$a$K!"(B + $B>o$K%(%i!<%m%0$r4F;k$9$k$N$,Lr$KN)$D>l9g$,$h$/$"$j$^$9!#(B + Unix $B%7%9%F%`$G$O!"<!$N$b$N$r;H$&$3$H$,$G$-$^$9!#(B</p> + + <blockquote> + <code>tail -f error_log</code> + </blockquote> + <hr /> + + <h2><a id="accesslog" name="accesslog">$B%"%/%;%9%m%0(B</a></h2> + + <table border="1"> + <tr> + <td valign="top"><strong>$B4XO"%b%8%e!<%k(B</strong><br /> + <br /> + <a href="mod/mod_log_config.html">mod_log_config</a><br /> + </td> + + <td valign="top"><strong>$B4XO"%G%#%l%/%F%#%V(B</strong><br /> + <br /> + <a + href="mod/mod_log_config.html#customlog">CustomLog</a><br /> + <a + href="mod/mod_log_config.html#logformat">LogFormat</a><br /> + <a href="mod/mod_setenvif.html#setenvif">SetEnvIf</a> + </td> + </tr> + </table> + + <p>$B%5!<%P%"%/%;%9%m%0$O%5!<%P$,=hM}$r$7$?$9$Y$F$N%j%/%(%9%H$r(B + $B5-O?$7$^$9!#%"%/%;%9%m%0$N>l=j$HFbMF$O(B <a + href="mod/mod_log_config.html#customlog">CustomLog</a> + $B%G%#%l%/%F%#%V$K$h$j7h$^$j$^$9!#%m%0$NFbMF$NA*Br$r4J7i$K$9$k$?$a$K(B + <a href="mod/mod_log_config.html#logformat">LogFormat</a> + $B%G%#%l%/%F%#%V$r;HMQ$9$k$3$H$,$G$-$^$9!#$3$N%;%/%7%g%s$O%"%/%;%9%m%0$K(B + $B>pJs$r5-O?$9$k$?$a$N%5!<%P$N@_DjJ}K!$r@bL@$7$^$9!#(B</p> + + <p>$B$b$A$m$s!"%"%/%;%9%m%0$K>pJs$rC_@Q$9$k$3$H$O%m%04IM}$N(B + $B;O$^$j$K2a$.$^$;$s!#<!$NCJ3,$OM-MQ$JE}7W$r<h$k$?$a$K$3$N>pJs$r(B + $B2r@O$9$k$3$H$G$9!#0lHLE*$J%m%02r@O$O$3$NJ8=q$NHO0O30$G!"(B + $B%&%'%V%5!<%P<+?H$N;E;v$H$$$&$o$1$G$b$"$j$^$;$s!#$3$NOC$d!"(B + $B%m%02r@O$r9T$J$&%"%W%j%1!<%7%g%s$N>pJs$rF@$k$K$O!"(B<a + href="http://dmoz.org/Computers/Software/Internet/Site_Management/Log_analysis/"> + Open Directory</a> $B$d(B <a + href="http://dir.yahoo.com/Computers_and_Internet/Software/Internet/World_Wide_Web/Servers/Log_Analysis_Tools/"> + Yahoo</a> $B$rD4$Y$F$/$@$5$$!#(B</p> + + <p>$B$$$m$s$J%P!<%8%g%s$N(B Apache httpd $B$,(B mod_log_config, + mod_log_agent, <code>TransferLog</code> $B%G%#%l%/%F%#%V$H$$$C$?!"(B + $BB>$N%b%8%e!<%k$d%G%#%l%/%F%#%V$r;H$C$F%"%/%;%9$N%m%.%s%0$r(B + $B@)8f$7$F$-$^$7$?!#:#$G$O!"(B<code>CustomLog</code> $B$,$9$Y$F$N8E$$(B + $B%G%#%l%/%F%#%V$N5!G=$r4^$`$h$&$K$J$C$F$$$^$9!#(B</p> + + <p>$B%"%/%;%9%m%0$N=q<0$OHs>o$K=@Fp$J@_Dj$,2DG=$G$9!#(B + $B=q<0$O(B C $B$N(B printf(1) $B%U%)!<%^%C%HJ8;zNs$KHs>o$K;w$?(B + <a href="mod/mod_log_config.html#format">$B%U%)!<%^%C%HJ8;zNs(B</a> + $B$K$h$j;XDj$5$l$^$9!#$$$/$D$+<!$N@a$GNc$r<($7$^$9!#(B + $B%U%)!<%^%C%HJ8;zNs$K;HMQ$G$-$kFbMF$N0lMw$O(B <a + href="mod/mod_log_config.html">mod_log_config $B$NJ8=q(B</a> + $B$r8+$F$/$@$5$$!#(B</p> + + <h3><a id="common" name="common">Common Log Format</a></h3> + + <p>$B%"%/%;%9%m%0$N$h$/$"$k@_Dj$K0J2<$N$b$N$,$"$j$^$9!#(B</p> + + <blockquote> + <code>LogFormat "%h %l %u %t \"%r\" %>s %b" common<br /> + CustomLog logs/access_log common</code> + </blockquote> + + <p>$B$3$l$O!"(B<em>$B%K%C%/%M!<%`(B</em> <code>common</code> $B$rDj5A$7!"(B + $B%m%0$N%U%)!<%^%C%HJ8;zNs$N0l$D$H4XO"IU$1$^$9!#%U%)!<%^%C%HJ8;zNs$O(B + $B%Q!<%;%s%H%G%#%l%/%F%#%V$+$i$J$j!"$=$l$>$l$N%Q!<%;%s%H%G%#%l%/%F%#%V$O(B + $B%5!<%P$K$I$N>pJs$r%m%.%s%0$9$k$+$r;X<($7$^$9!#%U%)!<%^%C%HJ8;zNs$K(B + $BJ8;z$r$=$N$^$^F~$l$k$3$H$b$G$-!"$=$l$i$O%m%0$N=PNO$KD>@\%3%T!<$5$l$^$9!#(B + $B$=$3$K0zMQJ8;z(B (<code>"</code>) $B$r=q$/$H$-$O!"(B + $B%U%)!<%^%C%HJ8;zNs$N:G8e$H$7$F2r<a(B + $B$5$l$k$3$H$rKI$0$?$a$K%P%C%/%9%i%C%7%e$G%(%9%1!<%W$9$kI,MW$,$"$j$^$9!#(B + $B%U%)!<%^%C%HJ8;zNs$K$O2~9TMQ$N(B "<code>\n</code>"$B!"%?%VMQ$N(B + "<code>\t</code>" $B$H$$$&FCJL$J@)8fJ8;z$b4^$a$k$3$H$,$G$-$^$9!#(B</p> + + <p><code>CustomLog</code> $B%G%#%l%/%F%#%V$O4{$KDj5A$5$l$?(B + <em>$B%K%C%/%M!<%`(B</em> $B$r;H$C$F?7$7$$%m%0%U%!%$%k$r@_Dj$7$^$9!#(B + $B%"%/%;%9%m%0$N%U%!%$%kL>$O%9%i%C%7%e$G;O$^$i$J$$8B$j!"(B + <a href="mod/core.html#serverroot">ServerRoot</a> $B$+$i$NAjBP%Q%9$H$7$F(B + $B07$o$l$^$9!#(B</p> + + <p>$B>e$N@_Dj$O(B Common Log Format (CLF) $B$H8F$P$l$k7A<0$G(B + $B%m%0%(%s%H%j$r=q$-$^$9!#$3$NI8=`$N7A<0$O0[$J$k%&%'%V%5!<%P$NB?$/$,(B + $B@8@.$9$k$3$H$,$G$-!"B?$/$N%m%02r@O%W%m%0%i%`$,FI$_$3$`$3$H$,$G$-$^$9!#(B + CLF $B$K$h$j@8@.$5$l$?%m%0%U%!%$%k$N%(%s%H%j$O0J2<$N$h$&$K$J$j$^$9(B:</p> + + <blockquote> + <code>127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET + /apache_pb.gif HTTP/1.0" 200 2326</code> + </blockquote> + + <p>$B$3$N%m%0%(%s%H%j$N$=$l$>$l$NItJ,$N0UL#$O0J2<$G@bL@$7$^$9!#(B</p> + + <dl> + <dt><code>127.0.0.1</code> (<code>%h</code>)</dt> + + <dd>$B$3$l$O%5!<%P$X%j%/%(%9%H$r$7$?%/%i%$%"%s%H(B ($B%j%b!<%H%[%9%H(B) + $B$N(B IP $B%"%I%l%9$G$9!#(B<a + href="mod/core.html#hostnamelookups">HostnameLookups</a> $B$,(B + <code>On</code> $B$N>l9g$O!"%5!<%P$O%[%9%HL>$rD4$Y$F!"(B + IP $B%"%I%l%9$,=q$+$l$F$$$k$H$3$m$K5-O?$7$^$9!#$7$+$7!"$3$N@_Dj$O(B + $B%5!<%P$r$+$J$jCY$/$9$k$N$G!"$"$^$j$*4+$a$G$-$^$;$s!#(B + $B$=$&$G$O$J$/!"(B<a href="programs/logresolve.html">logresolve</a> $B$N(B + $B$h$&$J%m%0$N8e=hM}$r9T$J$&%W%m%0%i%`$G%[%9%HL>$rD4$Y$k$N$,NI$$$G$7$g$&!#(B + $B$3$3$KJs9p$5$l$k(B IP $B%"%I%l%9$OI,$:$7$b%f!<%6$,;H$C$F$$$k%^%7%s$N(B + $B$b$N$G$"$k$H$O8B$j$^$;$s!#%f!<%6$H%5!<%P$N4V$K%W%m%-%7%5!<%P$,(B + $B$"$l$P!"$3$N%"%I%l%9$O85$N%^%7%s$N$b$N$G$O$J$/!"%W%m%-%7$N(B + $B%"%I%l%9$K$J$j$^$9!#(B</dd> + + <dt><code>-</code> (<code>%l</code>)</dt> + + <dd>$B=PNOCf$N!V%O%$%U%s!W$OMW5a$5$l$?>pJs$,<j$KF~$i$J$+$C$?$H$$$&$3$H$r(B + $B0UL#$7$^$9!#$3$N>l9g!"<hF@$G$-$J$+$C$?>pJs$O%/%i%$%"%s%H$N%^%7%s$N(B + <code>identd</code> $B$K$h$j7h$^$k(B RFC 1413 $B$N%/%i%$%"%s%H$N(B + $B%"%$%G%s%F%#%F%#$G$9!#$3$N>pJs$O$"$^$j?.MQ$9$k$3$H$,$G$-$:!"(B + $B$7$C$+$j$H4IM}$5$l$?FbIt%M%C%H%o!<%/$r=|$$$F$O;H$&$Y$-$G$O$"$j$^$;$s!#(B + Apache $B$O(B <a + href="mod/core.html#identitycheck">IdentityCheck</a> $B$,(B + <code>On</code> $B$K$J$C$F$$$J$$8B$j!"$3$N>pJs$rF@$h$&$H$9$i$7$^$;$s!#(B</dd> + + <dt><code>frank</code> (<code>%u</code>)</dt> + + <dd>$B$3$l$O(B HTTP $BG'>Z$K$h$k!"%I%-%e%a%s%H$r%j%/%(%9%H$7$??M$N(B + $B%f!<%6(B ID $B$G$9!#(BCGI $B%9%/%j%W%H$K$ODL>oF1$8CM$,(B <code>REMOTE_USER</code> + $B4D6-JQ?t$H$7$FM?$($i$l$^$9!#%j%/%(%9%H$N%9%F!<%?%9%3!<%I(B + ($B0J2<$r;2>H(B) $B$,(B 401 $B$G$"$C$?>l9g$O!"%f!<%6$OG'>Z$K<:GT$7$F$$$k$N$G!"(B + $B$3$NCM$O?.MQ$G$-$^$;$s!#%I%-%e%a%s%H$,%Q%9%o!<%I$GJ]8n$5$l$F$$$J$$(B + $B>l9g$O!"$3$N%(%s%H%j$OA0$N$b$N$HF1$8$h$&$K(B "<code>-</code>" $B$K(B + $B$J$j$^$9!#(B</dd> + + <dt><code>[10/Oct/2000:13:55:36 -0700]</code> + (<code>%t</code>)</dt> + + <dd> + $B%5!<%P$,%j%/%(%9%H$N=hM}$r=*$($?;~9o$G$9!#=q<0$O(B: + + <blockquote> + <code>[day/month/year:hour:minute:second zone]<br /> + day = 2*digit<br /> + month = 3*letter<br /> + year = 4*digit<br /> + hour = 2*digit<br /> + minute = 2*digit<br /> + second = 2*digit<br /> + zone = (`+' | `-') 4*digit</code> + </blockquote> + $B%m%0$N%U%)!<%^%C%HJ8;zNs$K(B <code>%{format}t</code> $B$r(B + $B;XDj$9$k$3$H$G!"JL$N7A<0$G;~9o$rI=<($5$;$k$3$H$b$G$-$^$9!#(B + $B$3$N$H$-!"(B<code>format</code> $B$O(B C $B$NI8=`%i%$%V%i%j$N(B + <code>strftime(3)</code> $B$N7A<0$K$J$j$^$9!#(B + </dd> + + <dt><code>"GET /apache_pb.gif HTTP/1.0"</code> + (<code>\"%r\"</code>)</dt> + + <dd>$B%/%i%$%"%s%H$+$i$N%j%/%(%9%H$,Fs=E0zMQId$NCf$K<($5$l$F$$$^$9!#(B + $B%j%/%(%9%H$K$OB?$/$NM-MQ$J>pJs$,$"$j$^$9!#$^$:!"$3$N>l9g%/%i%$%"%s%H$,(B + $B;H$C$?%a%=%C%I$O(B <code>GET</code> $B$G$9!#<!$K!"%/%i%$%"%s%H$O(B + $B%j%=!<%9(B <code>/apache_pb.gif</code> $B$rMW5a$7$^$7$?!#$=$7$F!"(B + $B%/%i%$%"%s%H$O%W%m%H%3%k(B <code>HTTP/1.0</code> $B$r;HMQ$7$^$7$?!#(B + $B%j%/%(%9%H$N3FItJ,$rFHN)$K%m%0<}=8$9$k$3$H$b$G$-$^$9!#Nc$($P!"(B + $B%U%)!<%^%C%HJ8;zNs(B "<code>%m %U%q %H</code>" $B$O(B + $B%a%=%C%I!"%Q%9!"%/%(%jJ8;zNs!"%W%m%H%3%k$r%m%0<}=8$7!"(B + $B7k6I(B "<code>%r</code>" $B$H$^$C$?$/F1$8=PNO$K$J$j$^$9!#(B</dd> + + <dt><code>200</code> (<code>%>s</code>)</dt> + + <dd>$B%5!<%P$,%/%i%$%"%s%H$KAw$jJV$9%9%F!<%?%9%3!<%I$G$9!#(B + $B$3$N>pJs$O!"%j%/%(%9%H$,@.8y1~Ez(B (2 $B$G;O$^$k%3!<%I(B) $B$G$"$C$?$+!"(B + $B%j%@%$%l%/%7%g%s(B (3 $B$G;O$^$k%3!<%I(B) $B$G$"$C$?$+!"%/%i%$%"%s%H$K$h$k(B + $B%(%i!<(B (4 $B$G;O$^$k%3!<%I(B) $B$G$"$C$?$+!"%5!<%P$N%(%i!<(B (5 $B$G;O$^$k%3!<%I(B) + $B$G$"$C$?$+!"$r8=$9$N$G!"Hs>o$KBg@Z$G$9!#%9%F!<%?%9%3!<%I$N(B + $B40A4$J%j%9%H$O(B <a + href="http://www.w3.org/Protocols/rfc2616/rfc2616.txt">HTTP + $B5,3J(B</a> (RFC2616 $BBh(B 10 $B@a(B) $B$K$"$j$^$9!#(B</dd> + + <dt><code>2326</code> (<code>%b</code>)</dt> + + <dd>$B$3$N:G8e$N%(%s%H%j$O%/%i%$%"%s%H$KAw?.$5$l$?%*%V%8%'%/%H$N!"(B + $B1~Ez%X%C%@$r=|$$$?%5%$%:$r8=$7$^$9!#%3%s%F%s%H$,%/%i%$%"%s%H$KAw$i$l$J$+$C$?(B + $B>l9g$O!"$3$NCM$O(B "<code>-</code>" $B$K$J$j$^$9!#%3%s%F%s%H$,L5$$>l9g$K(B + "<code>0</code>" $B$r%m%0<}=8$9$k$K$O!"(B<code>%b</code> $B$G$O$J$/(B + <code>%B</code> $B$r;H$C$F$/$@$5$$!#(B</dd> + + </dl> + + <h4><a id="combined" name="combined">Combined Log + Format</a></h4> + + <p>$B$b$&0l$D$N$h$/;H$o$l$k=q<0$O(B Combined Log Format $B$H8F$P$l$F$$$^$9!#(B + $B0J2<$N$h$&$K$7$F;H$&$3$H$,$G$-$^$9!#(B</p> + + <blockquote> + <code>LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" + \"%{User-agent}i\"" combined<br /> + CustomLog log/acces_log combined</code> + </blockquote> + + <p>$B$3$N=q<0$N:G=i$NJ}$O(B Common Log Format $B$H$^$C$?$/F1$8$G!":G8e$K(B + $BFs$DDI2C$N%(%s%H%j$,$"$j$^$9!#DI2C$N%(%s%H%j$O%Q!<%;%s%H%G%#%l%/%F%#%V(B + <code>%{<em>header</em>}i</code> $B$r;H$C$F$$$^$9!#$3$3$G(B + <em>header</em> $B$O(B HTTP $B$N%j%/%(%9%H%X%C%@$N$I$l$+$G$9!#$3$N=q<0$K$h$k(B + $B%"%/%;%9%m%0$O0J2<$N$h$&$J46$8$K$J$j$^$9(B:</p> + + <blockquote> + <code>127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET + /apache_pb.gif HTTP/1.0" 200 2326 + "http://www.example.com/start.html" "Mozilla/4.08 [en] + (Win98; I ;Nav)"</code> + </blockquote> + + <p>$BDI2C$N%(%s%H%j$O(B:</p> + + <dl> + <dt><code>"http://www.example.com/start.html"</code> + (<code>\"%{Referer}i\"</code>)</dt> + + <dd>"Referer" ($B0U?^E*$JDV$j4V0c$$(B) HTTP $B%j%/%(%9%H%X%C%@$G$9!#(B + $B$3$l$O%/%i%$%"%s%H$,Js9p$7$F$/$k;2>H85$N%5%$%H$rI=$7$^$9!#(B + ($B$3$N>l9g$O!"(B<code>/apache_pb.gif</code> $B$K%j%s%/$7$F$$$k$+!"(B + $B$=$l$r4^$s$G$$$k%Z!<%8$G$9(B)$B!#(B</dd> + + <dt><code>"Mozilla/4.08 [en] (Win98; I ;Nav)"</code> + (<code>\"%{User-agent}i\"</code>)</dt> + + <dd>User-Agent HTTP $B%j%/%(%9%H%X%C%@$G$9!#$3$l$O%/%i%$%"%s%H$N%V%i%&%6$,(B + $B<+J,<+?H$N$3$H$rJs9p$7$F$/$k>pJs$G$9!#(B</dd> + </dl> + + <h3><a id="multiple" name="multiple">$BJ#?t$N%"%/%;%9%m%0(B</a></h3> + + <p>$BJ#?t$N%"%/%;%9%m%0$OC1$K@_Dj%U%!%$%k$KJ#?t$N(B <code>CustomLog</code> + $B%G%#%l%/%F%#%V$r=q$/$3$H$G:n@.$5$l$^$9!#Nc$($P!"0J2<$N%G%#%l%/%F%#%V$O(B + $B;0$D$N%"%/%;%9%m%0$r:n$j$^$9!#:G=i$N$b$N$O4pK\E*$J(B CLF $B$N>pJs$G!"(B + $BFs$DL\$H;0$DL\$O(B referer $B$H%V%i%&%6$N>pJs$G$9!#:G8eFs$D$N(B + <code>CustomLog</code> $B$O(B <code>ReferLog</code> $B%G%#%l%/%F%#%V$H(B + <code>AgentLog</code> $B%G%#%l%/%F%#%V$N8z2L$r$^$M$kJ}K!$r<($7$F$$$^$9!#(B</p> + + <blockquote> + <code>LogFormat "%h %l %u %t \"%r\" %>s %b" common<br /> + CustomLog logs/access_log common<br /> + CustomLog logs/referer_log "%{Referer}i -> %U"<br /> + CustomLog logs/agent_log "%{User-agent}i"</code> + </blockquote> + + <p>$B$3$NNc$O(B <code>LogFormat</code> $B$G%K%C%/%M!<%`$rDj5A$9$kI,MW$,$J$$!"(B + $B$H$$$&$3$H$b<($7$F$$$^$9!#%K%C%/%M!<%`$NBe$o$j$K!"(B + <code>CustomLog</code> $B%G%#%l%/%F%#%V$K(B + $BD>@\%m%0$N=q<0$r;XDj$9$k$3$H$,$G$-$^$9!#(B</p> + + <h3><a id="conditional" name="conditional">$B>r7oIU$-%m%.%s%0(B</a></h3> + + <p>$B%/%i%$%"%s%H$N%j%/%(%9%H$NFCD'$K4p$E$$$F%"%/%;%9%m%0$K%(%s%H%j$N(B + $B0lIt$r%m%.%s%0$7$J$$J}$,JXMx$J$3$H$,$"$j$^$9!#$3$l$O(B <a + href="env.html">$B4D6-JQ?t(B</a> $B$NJd=u$K$h$j4JC1$K<B8=$G$-$^$9!#$^$:!"(B + $B%j%/%(%9%H$,2?$i$+$N>r7o$K9g$&$H$$$&$3$H$r8=$9$?$a$K4D6-JQ?t$,(B + $B@_Dj$5$l$kI,MW$,$"$j$^$9!#$3$l$ODL>o$O(B <a + href="mod/mod_setenvif.html#setenvif">SetEnvIf</a> $B$K$h$j(B + $B9T$J$o$l$^$9!#$=$7$F!"(B<code>CustomLog</code> $B%G%#%l%/%F%#%V$N(B + <code>env=</code> $B@a$r;H$C$F4D6-JQ?t$,@_Dj$5$l$F$$$k%j%/%(%9%H$r(B + $B4^$a$?$jGS=|$7$?$j$9$k$3$H$,$G$-$^$9!#$$$/$D$+Nc$r5s$2$^$9(B:</p> + + <blockquote> + <code># Mark requests from the loop-back interface<br /> + SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog<br /> + # Mark requests for the robots.txt file<br /> + SetEnvIf Request_URI "^/robots\.txt$" dontlog<br /> + # Log what remains<br /> + CustomLog logs/access_log common env=!dontlog</code> + </blockquote> + + <p>$BB>$NNc$H$7$F!"1Q8l$rOC$9?M$+$i$N%j%/%(%9%H$H$=$l0J30$N?M$+$i$N%j%/%(%9%H$r(B + $BJ,$1$?$$!"$H$$$&>l9g$r9M$($F$_$F$/$@$5$$!#(B</p> + + <blockquote> + <code>SetEnvIf Accept-Language "en" english<br /> + CustomLog logs/english_log common env=english<br /> + CustomLog logs/non_english_log common env=!english</code> + </blockquote> + + <p>$B$3$3$^$G$G$O>r7oIU$-%m%.%s%0$,Hs>o$K6/NO$G=@Fp$G$"$k$3$H$r<($7$F$-$^$7$?$,!"(B + $B$=$l$,%m%0$NFbMF$r@)8f$9$kM#0l$NJ}K!$H$$$&$o$1$G$O$"$j$^$;$s!#%m%0%U%!%$%k$O(B + $B%5!<%P$N3hF0$N40A4$J5-O?$G$"$kJ}$,$h$jLr$KN)$A$^$9!#C1=c$K%m%0%U%!%$%k$r(B + $B8e=hM}$7$F!"9MN8$7$?$/$J$$%m%0$r:o=|$9$kJ}$,4JC1$G$"$k$3$H$,$h$/$"$j$^$9!#(B</p> + + <hr /> + + <h2><a id="rotation" name="rotation">$B%m%0$N8rBX(B</a></h2> + + <p>$BIaDL$NIi2Y$N%5!<%P$G$5$(!"%m%0%U%!%$%k$KJ]B8$5$l$k>pJs$NNL$O(B + $BKDBg$K$J$j$^$9!#%"%/%;%9%m%0$N%U%!%$%k$OIaDL(B 10,000 $B%j%/%(%9%HKh$K(B + 1 MB $B0J>eA}$($^$9!#$G$9$+$i!"4{B8$N%m%0$r0\F0$7$?$j!":o=|$7$?$j$7$F!"(B + $BDj4|E*$K%m%0$r8rBX$5$;$k$3$H$,I,MW$K$J$j$^$9!#$3$l$O%5!<%P$N<B9TCf$K$O(B + $B9T$J$($^$;$s!#$H$$$&$N$O!"(BApache $B$O%U%!%$%k$,(B open $B$5$l$F$$$k4V$O(B + $B$:$C$H8E$$%m%0%U%!%$%k$K=q$-B3$1$k$+$i$G$9!#(B + $B?7$7$$%m%0%U%!%$%k$r(B open $B$G$-$k$h$&$K!"%m%0%U%!%$%k$,0\F0$5$l$?$j(B + $B:o=|$5$l$?8e$K!"%5!<%P$r(B<a href="stopping.html">$B:F5/F0(B</a>$B$9$k(B + $BI,MW$,$"$j$^$9!#(B</p> + + <p><em>$BM%2m$J(B</em> $B:F5/F0$r9T$J$&$3$H$G!"%5!<%P$O4{B8$N%3%M%/%7%g%s$d(B + $B=hM}BT$A$N%3%M%/%7%g%s$r<:$&$3$H$J$/?7$7$$%m%0%U%!%$%k$r(B open $B$5$;$k(B + $B$3$H$,$G$-$^$9!#$7$+$7!"$3$l$r<B8=$9$k$?$a$K!"%5!<%P$O8E$$%j%/%(%9%H$r(B + $B07$C$F$$$k4V$O8E$$%m%0%U%!%$%k$K=q$-B3$1$kI,MW$,$"$j$^$9!#(B + $B$G$9$+$i!":F5/F0$N8e$G$O%m%0%U%!%$%k$N=hM}$r;O$a$kA0$K!"$7$P$i$/BT$?$J$1$l$P(B + $B$J$j$^$;$s!#C1$K%m%0$r8rBX$5$;$F!"%G%#%9%/$N@aLs$N$?$a$K8E$$%m%0$r(B + $B05=L$9$kIaDL$N%7%J%j%*$O(B:</p> + + <blockquote> + <code>mv access_log access_log.old<br /> + mv error_log error_log.old<br /> + apachectl graceful<br /> + sleep 600<br /> + gzip access_log.old error_log.old</code> + </blockquote> + + <p>$B%m%0$N8rBX$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7$^$9!#(B + $B$G$9$+$i!"%W%m%0%i%`$r4JC1$G0BA4$KJ]$D$3$H$,Hs>o$K=EMW$G$9!#(B</p> + + <p>$B%Q%$%W7PM3$N%m%0$r;H$&4JC1$JNc$O(B:</p> + + <blockquote> + <code># compressed logs<br /> + CustomLog "|/usr/bin/gzip -c >> + /var/log/access_log.gz" common<br /> + # almost-real-time name resolution<br /> + CustomLog "|/usr/local/apache/bin/logresolve >> + /var/log/access_log" common</code> + </blockquote> + + <p>$B%Q%$%W$N@h$G8F$P$l$k%3%^%s%IA4BN$,0zMQId$G0O$^$l$F$$$k$3$H$KCmL\$7$F(B + $B$/$@$5$$!#$3$NNc$O%"%/%;%9%m%0$r;H$C$F$$$^$9$,!"%(%i!<%m%0$K$bF1$85;=Q$r(B + $B;H$&$3$H$,$G$-$^$9!#(B</p> + + <p>$B%Q%$%W7PM3$N%m%0$N=EMW$JMxMQK!$O!"%m%0$N8rBX$r%5!<%P$N:F5/F0$J$7$G(B + $B$9$k$b$N$G$9!#(BApache HTTP $B%5!<%P$K$O$3$N$?$a$N(B <a + href="programs/rotatelogs.html">rotatelogs</a> $B$H8F$P$l$k4JC1$J(B + $B%W%m%0%i%`$,IUB0$7$F$$$^$9!#$?$H$($P!"(B24 $B;~4VKh$K%m%0$r8rBX$5$;$k$K$O!"(B + $B0J2<$N$b$N$r;H$&$3$H$,$G$-$^$9(B:</p> + + <blockquote> + <code>CustomLog "|/usr/local/apache/bin/rotatelogs + /var/log/access_log 86400" common</code> + </blockquote> + + <p>$B;w$F$$$k$1$l$I!"$h$j$:$C$H=@Fp$J(B + <a href="http://www.cronolog.org/">cronolog</a> $B$H$$$&%m%08rBXMQ$N(B + $B%W%m%0%i%`$,30It$N%5%$%H$K$"$j$^$9!#(B</p> + + <p>$B>r7oIU$-%m%.%s%0$HF1MM!"%Q%$%W7PM3$N%m%0$OHs>o$K6/NO$J(B + $BF;6q$G$9$,!"%*%U%i%$%s$N8e=hM}$N$h$&$J!"$h$j4JC1$J2r7hJ}K!$,$"$k$H$-$O(B + $B;H$o$J$$J}$,NI$$$G$7$g$&!#(B</p> + + <h2><a id="virtualhosts" name="virtualhosts">$B%P!<%A%c%k%[%9%H(B</a></h2> + + <p>$BB?$/$N(B <a href="vhosts/">$B%P!<%A%c%k%[%9%H(B</a> $B$N$"$k%5!<%P$r<B9T$7$F$$$k(B + $B$H$-$O!"%m%0%U%!%$%k$N07$$J}$K$$$/$D$+$NJ}K!$,$"$j$^$9!#(B + $B$^$:!"C1FH$N%[%9%H$N$_$N%5!<%P$H$^$C$?$/F1$8$h$&$K%m%0$r;H$&$3$H$,$G$-$^$9!#(B + $B%m%.%s%0%G%#%l%/%F%#%V$r<g%5!<%P$N%3%s%F%-%9%H$N(B + <code><VirtualHost></code> $B%;%/%7%g%s$N30$KCV$/$3$H$G!"(B + $B$9$Y$F$N%m%0$rF1$8%"%/%;%9%m%0$H%(%i!<%m%0$K%m%0<}=8$9$k$3$H$,$G$-$^$9!#(B + $B$3$N<jK!$G$O8D!9$N%P!<%A%c%k%[%9%H$NE}7W$r4JC1$K$H$k$3$H$O$G$-$^$;$s!#(B</p> + + <p><code>CustomLog</code> $B$d(B <code>ErrorLog</code> $B%G%#%l%/%F%#%V$,(B + <code><VirtualHost></code> $B$NCf$KCV$+$l$?>l9g$O!"$=$N%P!<%A%c%k(B + $B%[%9%H$X$N$9$Y$F$N%j%/%(%9%H$d%(%i!<$,$=$3$G;XDj$5$l$?%U%!%$%k$K$N$_(B + $B%m%0<}=8$5$l$^$9!#%m%.%s%0%G%#%l%/%F%#%V$N$J$$%P!<%A%c%k%[%9%H$O(B + $B0MA3$H$7$F%j%/%(%9%H$,<g%5!<%P$N%m%0$KAw$i$l$^$9!#$3$N<jK!$O>/$J$$(B + $B%P!<%A%c%k%[%9%H$KBP$7$F$OHs>o$KM-MQ$G$9$,!"%[%9%H$N?t$,Hs>o$KB?$/$J$k$H(B + $B4IM}$,BgJQ$K$J$j$^$9!#$5$i$K!"(B<a + href="vhosts/fd-limits.html">$B%U%!%$%k5-=R;R$N8B3&(B</a>$B$NLdBj$r5/$3$9$3$H$,(B + $B$"$j$^$9!#(B</p> + + <p>$B%"%/%;%9%m%0$K$O!"Hs>o$KNI$$BE6(0F$,$"$j$^$9!#%P!<%A%c%k%[%9%H$N(B + $B>pJs$r%m%0$N%U%)!<%^%C%HJ8;zNs$K2C$($k$3$H$G!"$9$Y$F$N%[%9%H$X$N(B + $B%j%/%(%9%H$rF1$8%m%0$K%m%0<}=8$7$F!"8e$G%m%0$r8D!9$N%U%!%$%k$KJ,3d$9$k$3$H$,(B + $B$G$-$^$9!#$?$H$($P!"0J2<$N%G%#%l%/%F%#%V$r8+$F$/$@$5$$!#(B</p> + + <blockquote> + <code>LogFormat "%v %l %u %t \"%r\" %>s %b" + comonvhost<br /> + CustomLog logs/access_log comonvhost</code> + </blockquote> + + <p><code>%v</code> $B$,%j%/%(%9%H$r07$C$F$$$k%P!<%A%c%k%[%9%H$NL>A0$r(B + $B%m%0<}=8$9$k$?$a$K;H$o$l$F$$$^$9!#$=$7$F!"(B<a + href="programs/other.html">split-logfile</a> $B$N$h$&$J%W%m%0%i%`$r(B + $B;H$C$F%"%/%;%9%m%0$r8e=hM}$9$k$3$H$G!"(B + $B%P!<%A%c%k%[%9%HKh$N%U%!%$%k$K%m%0$rJ,3d$9$k$3$H$,$G$-$^$9!#(B</p> + + <p>$B;DG0$J$,$i!"%(%i!<%m%0$K$OF1MM$N<jK!$O$"$j$^$;$s!#$G$9$+$i!"(B + $B$9$Y$F$N%P!<%A%c%k%[%9%H$rF1$8%(%i!<%m%0$NCf$K:.$<$k$+!"(B + $B%P!<%A%c%k%[%9%HKh$K%(%i!<%m%0$r;H$&$+$rA*$P$J$1$l$P$J$j$^$;$s!#(B</p> + <hr /> + + <h2><a id="other" name="other">$BB>$N%m%0%U%!%$%k(B</a></h2> + + <table border="1"> + <tr> + <td valign="top"><strong>$B4XO"%b%8%e!<%k(B</strong><br /> + <br /> + <a href="mod/mod_cgi.html">mod_cgi</a><br /> + <a href="mod/mod_rewrite.html">mod_rewrite</a> </td> + + <td valign="top"><strong>$B4XO"%G%#%l%/%F%#%V(B</strong><br /> + <br /> + <a href="mod/core.html#pidfile">PidFile</a><br /> + <a + href="mod/mod_rewrite.html#RewriteLog">RewriteLog</a><br /> + <a + href="mod/mod_rewrite.html#RewriteLogLevel">RewriteLogLevel</a><br /> + <a href="mod/mod_cgi.html#scriptlog">ScriptLog</a><br /> + <a + href="mod/mod_cgi.html#scriptloglength">ScriptLogLength</a><br /> + <a + href="mod/mod_cgi.html#scriptlogbuffer">ScriptLogBuffer</a> + </td> + </tr> + </table> + + <h3><a id="pidfile" name="pidfile">PID $B%U%!%$%k(B</a></h3> + + <p>$B5/F0;~$K!"(BApache $B$O?F(B httpd $B%W%m%;%9$N%W%m%;%9(B ID $B$r(B + <code>logs/httpd.pid</code> $B$KJ]B8$7$^$9!#$3$N(B + $B%U%!%$%kL>$O(B <a + href="mod/core.html#pidfile">PidFile</a> $B%G%#%l%/%F%#%V$r;H$C$F(B + $BJQ99$9$k$3$H$,$G$-$^$9!#%W%m%;%9(B ID $B$O4IM}<T$,?F%W%m%;%9$K(B + $B%7%0%J%k$rAw$k$3$H$G%G!<%b%s$r:F5/F0$7$?$j=*N;$5$;$?$j$9$k$H$-$K(B + $B;HMQ$7$^$9!#(BWindows $B$G$O!"Be$o$j$K(B -k $B%3%^%s%I%*%W%7%g%s$r(B + $B;H$C$F$/$@$5$$!#>\$7$$>pJs$O(B <a href="stopping.html">$B=*N;$H(B + $B:F5/F0(B</a> $B$N%Z!<%8$r8+$F$/$@$5$$!#(B</p> + + <h3><a id="scriptlog" name="scriptlog">$B%9%/%j%W%H%m%0(B</a></h3> + + <p>$B%G%P%C%0$NJd=u$N$?$a$K!"(B<a + href="mod/mod_cgi.html#scriptlog">ScriptLog</a> $B%G%#%l%/%F%#%V$O(B + CGI $B%9%/%j%W%H$NF~NO$H=PNO$r5-O?$9$k$h$&$K$G$-$^$9!#(B + $B$3$l$O%F%9%HMQ$K$N$_;HMQ$7$F!"DL>o$N%5!<%P$G$O;HMQ$7$J$$$G$/$@$5$$!#(B + $B>\$7$$>pJs$O(B <a + href="mod/mod_cgi.html">mod_cgi $B$NJ8=q(B</a> $B$K$"$j$^$9!#(B</p> + + <h3><a id="rewritelog" name="rewritelog">$B%j%i%$%H%m%0(B</a></h3> + + <p><a + href="mod/mod_rewrite.html">mod_rewrite</a> $B$N6/NO$GJ#;($J5!G=$r(B + $B;H$C$F$$$k$H$-$O!"$[$\$$$D$b%G%P%C%0$r4JC1$K$9$k$?$a$K(B + <a href="mod/mod_rewrite.html#RewriteLog">RewriteLog</a> $B$N;HMQ$,(B + $BI,MW$G$7$g$&!#$3$N%m%0%U%!%$%k$K$O%j%i%$%H%(%s%8%s$,%j%/%(%9%H$r(B + $B=q$-49$($kJ}K!$N>\:Y$J2r@O$,=PNO$5$l$^$9!#>\$7$5$NEY9g$O(B <a + href="mod/mod_rewrite.html#RewriteLogLevel">RewriteLogLevel</a> + $B$G@)8f$G$-$^$9!#(B</p> + <!--#include virtual="footer.html" --> + </body> +</html> + |