httpd-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yoshiki Hayashi <yosh...@xemacs.org>
Subject Re: [PATCH] Bring 2.1 mod_example.xml up to date
Date Fri, 04 Jul 2003 08:58:36 GMT
Joshua Slive <joshua@slive.ca> writes:

> I've never played with mod_example myself, but it appears there are still
> some problems in the docs.  For example, I don't think that the example of
> creating mod_myexample will work, since config.m4 would also need to be
> updated and buildconf run.

Yes, I thought it was necessary but I wasn't sure it was.

> Other than that, I don't have time to look in detail right now.  Sorry.

No problem.  I haven't had time to work on it, either.
Fortunately, I could find some time to update the docs this
week.  I hope someone has time to review my patch this time.

The only change from the previous version is that I added
config.m4 and autoconf step to add your own module section
as suggested by Joshua.  I think adding a new module should
be covered by its own docs together with apxs for DSO but I
wouldn't go that far this time and only concentrate on bring
the doc up to date.

Here's the update patch.  I have also put the full HTML
version at http://cvs.apache.org/~yoshiki/mod/mod_example.html.en

Index: 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
--- mod_example.xml	18 Apr 2003 02:28:28 -0000	1.4
+++ mod_example.xml	4 Jul 2003 08:48:00 -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,40 @@
 
     <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>Modify the file.</li>
+
+      <li>Modify modules/experimental/config.m4.
+	<ol>
+	  <li>Copy APACHE_MODULE line with "example" in it.</li>
+	  <li>Replace the first argument "example" with <em>myexample</em>.</li>
+	  <li>Replace the second argument with brief description of your module.
+          It will be used in <code>configure --help</code>.</li>
+	</ol>
+      </li>
 
-      <li><code>cp src/modules/example/*
-      src/modules/<em>mymodule</em></code></li>
+      <li>Run autoconf from the top-level directory.</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: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Mime
View raw message