Here's a patch to update
httpd-2.1/docs/manual/mod/mod_example.xml.  

I put the updated HTML version at
http://cvs.apache.org/~yoshiki/mod/mod_example.html.en

The most notable difference about 1.3 mod_example and 2.1
mod_example is the location of source code.  It was moved
from 1.3/src/modules/example to 2.1/modules/experimental.

2.1 version has more hooks but what kinds of hook is present
in the module is not documented.  I didn't try to add new
sections in this round.

configure and build part is basically lifted from README
file in the experimental directory.  One thing I'm not sure
about is adding a new module part.  I think you need to add
APACHE_MODULE() line to config.m4 and rerun autoconf from
the top level directory for --enable-myexample option to
appear in configure script.  I didn't modifiy this part
because I haven't verified this myself.  I appreciate
comments from someone more familiar with these stuff.

Index: manual/mod/mod_example.xml
===================================================================
RCS file: /home/penny/cvsroot/httpd-2.0/docs/manual/mod/mod_example.xml,v
retrieving revision 1.4
diff -u -r1.4 mod_example.xml
--- manual/mod/mod_example.xml  18 Apr 2003 02:28:28 -0000      1.4
+++ manual/mod/mod_example.xml  17 Jun 2003 00:20:59 -0000
@@ -10,14 +10,7 @@
 <identifier>example_module</identifier>
 
 <summary>
-<note type="warning">
-      This document has not been updated
-      to take into account changes made in the 2.0 version of the
-      Apache HTTP Server. Some of the information may still be
-      relevant, but please use it with care.
-</note>
-
-    <p>The files in the <code>src/modules/example directory</code>
+    <p>Some files in the <code>modules/experimental</code> directory
     under the Apache distribution directory tree are provided as an
     example to those that wish to write modules that use the Apache
     API.</p>
@@ -41,43 +34,29 @@
 
     <ol>
       <li>
-        Uncomment the "AddModule modules/example/mod_example" line
-        near the bottom of the <code>src/Configuration</code> file.
-        If there isn't one, add it; it should look like this: 
-<example>
-     AddModule modules/example/mod_example.o
-</example>
-      </li>
-
-      <li>Run the <code>src/Configure</code> script
-      ("<code>cd&nbsp;src;&nbsp;./Configure</code>"). This will
-      build the Makefile for the server itself, and update the
-      <code>src/modules/Makefile</code> for any additional modules
-      you have requested from beneath that subdirectory.</li>
+        Run <code>configure</code> with <code>--enable-example</code>
+        option.</li>
 
-      <li>Make the server (run "<code>make</code>" in the
-      <code>src</code> directory).</li>
+      <li>Make the server (run "<code>make</code>").</li>
     </ol>
 
     <p>To add another module of your own:</p>
 
     <ol type="A">
-      <li><code>mkdir src/modules/<em>mymodule</em></code></li>
+      <li><code>cp modules/experimental/mod_example.c
+      modules/experimental/<em>mod_myexample.c</em></code></li>
 
-      <li><code>cp src/modules/example/*
-      src/modules/<em>mymodule</em></code></li>
+      <li>Modify the file.</li>
 
-      <li>Modify the files in the new directory.</li>
+      <li>Build the server with --enable-myexample</li>
 
-      <li>Follow steps [1] through [3] above, with appropriate
-      changes.</li>
     </ol>
 </section>
 
 <section id="using"><title>Using the <code>mod_example</code> Module</title>
 
     <p>To activate the example module, include a block similar to
-    the following in your <code>srm.conf</code> file:</p>
+    the following in your <code>httpd.conf</code> file:</p>
 <example>
    &lt;Location /example-info&gt;<br />
        SetHandler example-handler<br />
-- 
Yoshiki Hayashi

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to