[deployment-guide/comm-rel: 633/727] Updated the Working with Modules section.

Jaromir Hradilek jhradile at fedoraproject.org
Tue Oct 19 13:18:51 UTC 2010


commit f43753c88a8424a5aa67b206a321fad031bb92a5
Author: Jaromir Hradilek <jhradile at redhat.com>
Date:   Wed Sep 8 20:10:03 2010 +0200

    Updated the Working with Modules section.

 en-US/The_Apache_HTTP_Server.xml |   63 ++++++++++++++++++++-----------------
 1 files changed, 34 insertions(+), 29 deletions(-)
---
diff --git a/en-US/The_Apache_HTTP_Server.xml b/en-US/The_Apache_HTTP_Server.xml
index 31b9f2c..2ea8386 100644
--- a/en-US/The_Apache_HTTP_Server.xml
+++ b/en-US/The_Apache_HTTP_Server.xml
@@ -1639,7 +1639,7 @@ ErrorDocument 404 /404-not_found.html</screen>
               The <replaceable>name</replaceable> has to be a valid identifier of the required module. The <replaceable>path</replaceable> refers to an existing module file, and must be relative to the directory in which the libraries are placed (that is, <filename class="directory">/usr/lib/httpd/</filename> by default).
             </para>
             <para>
-              Refer to <xref linkend="s1-apache-addmods" /> for more information on the Apache HTTP Server's DSO support.
+              Refer to <xref linkend="s1-apache-dso" /> for more information on the Apache HTTP Server's DSO support.
             </para>
             <example id="example-apache-httpdconf-loadmodule">
               <title>Using the <option>LoadModule</option> directive</title>
@@ -2871,36 +2871,41 @@ ErrorDocument 404 /404-not_found.html</screen>
       </variablelist>
     </section>
   </section>
-  <section id="s1-apache-addmods">
-    <title>Adding Modules</title>
+  <section id="s1-apache-dso">
+    <title>Working with Modules</title>
     <para>
-      The Apache HTTP Server is distributed with a number of modules. More information about Apache HTTP modules can be found on <ulink url="http://httpd.apache.org/docs/2.2/mod/" />.
-    </para>
-    <para>
-      The Apache HTTP Server supports <firstterm>Dynamically Shared Objects</firstterm> (<firstterm>DSO</firstterm>s), or modules, which can easily be loaded at runtime as necessary.
-    </para>
-    <para>
-      The Apache Project provides complete DSO documentation online at <ulink url="http://httpd.apache.org/docs/2.2/dso.html" />. Or, if the <filename>http-manual</filename> package is installed, documentation about DSOs can be found online at <ulink url="http://localhost/manual/mod/" />.
-    </para>
-    <para>
-      For the Apache HTTP Server to use a DSO, it must be specified in a <command>LoadModule</command> directive within <filename>/etc/httpd/conf/httpd.conf</filename>. If the module is provided by a separate package, the line must appear within the modules configuration file in the <filename>/etc/httpd/conf.d/</filename> directory.<!-- Refer to <xref linkend="s2-apache-loadmodule" /> for more information. -->
-    </para>
-    <para>
-      If adding or deleting modules from <filename>http.conf</filename>, Apache HTTP Server must be reloaded or restarted, as referred to in <xref linkend="s1-apache-running" />.
-    </para>
-    <para>
-      If creating a new module, first install the <filename>httpd-devel</filename> package which contains the include files, the header files, as well as the <firstterm>APache eXtenSion</firstterm> (<command>/usr/sbin/apxs</command>) application, which uses the include files and the header files to compile DSOs.
-    </para>
-    <para>
-      After writing a module, use <command>/usr/sbin/apxs</command> to compile the module sources outside the Apache source tree. For more information about using the <command>/usr/sbin/apxs</command> command, refer to the the Apache documentation online at <ulink url="http://httpd.apache.org/docs/2.2/dso.html" /> as well as the <command>apxs</command> man page.
-    </para>
-    <para>
-      Once compiled, put the module in the <filename>/usr/lib/httpd/modules/</filename> directory. For 64-bit &MAJOROS; hosts using the defaut 64-bit user-space, this path will be <filename>/usr/lib64/httpd/modules/</filename>. Then add a <command>LoadModule</command> line to the <filename>httpd.conf</filename>, using the following structure:
-    </para>
-    <screen><command>LoadModule <replaceable>&lt;module-name&gt; &lt;path/to/module.so&gt;</replaceable></command></screen>
-    <para>
-      Where <replaceable>&lt;module-name&gt;</replaceable> is the name of the module and <replaceable>&lt;path/to/module.so&gt;</replaceable> is the path to the DSO.
+      Being a modular application, the <systemitem class="service">httpd</systemitem> service is distributed along with a number of <firstterm>Dynamic Shared Objects</firstterm> (DSOs), which can be dynamically loaded or unloaded at runtime as necessary. By default, these modules are located in <filename class="directory">/usr/lib/httpd/modules/</filename>.
     </para>
+    <section id="s2-apache-dso-loading">
+      <title>Loading a Module</title>
+      <para>
+        To load a particular DSO module, use the <option>LoadModule</option> directive as described in <xref linkend="s2-apache-httpdconf-directives" />. Note that modules provided by a separate package often have their own configuration file in the <filename class="directory">/etc/httpd/conf.d/</filename> directory.
+      </para>
+      <example id="example-apache-dso-loading">
+        <title>Loading the <systemitem class="resource">mod_ssl</systemitem> DSO</title>
+        <screen>LoadModule ssl_module modules/mod_ssl.so</screen>
+      </example>
+      <para>
+        Once you are finished, restart the web server to reload the configuration. Refer to <xref linkend="s3-apache-running-restarting" /> for more information on how to restart the <systemitem class="service">httpd</systemitem> service.
+      </para>
+    </section>
+    <section id="s2-apache-dso-writing">
+      <title>Writing a Module</title>
+      <para>
+        If you intend to create a new DSO module, make sure you have the <package>httpd-devel</package> package installed. To do so, type the following at a shell prompt:
+      </para>
+      <screen>~]# <command>yum install httpd-devel</command></screen>
+      <para>
+        This package contains the include files, the header files, and the <application>APache eXtenSion</application> (<command>apxs</command>) utility required to compile a module.
+      </para>
+      <para>
+        Once written, you can build the module with the following command:
+      </para>
+      <screen>~]# <command>apxs -i -a -c <replaceable>module_name</replaceable>.c</command></screen>
+      <para>
+        If the build was successful, you should be able to load the module the same way as any other module that is distributed with the Apache HTTP Server.
+      </para>
+    </section>
   </section>
   <section id="s1-apache-virtualhosts">
     <title>Setting Up Virtual Hosts</title>


More information about the docs-commits mailing list