[deployment-guide/comm-rel: 591/727] Updated the <IfModule> directive description.

Jaromir Hradilek jhradile at fedoraproject.org
Tue Oct 19 13:14:43 UTC 2010


commit e9aa20a3aee69f562969e771036d349e9ddc6df2
Author: Jaromir Hradilek <jhradile at redhat.com>
Date:   Mon Sep 6 17:01:59 2010 +0200

    Updated the <IfModule> directive description.
    
    I have also extended the previous IfDefine description a bit.

 en-US/The_Apache_HTTP_Server.xml |   45 +++++++++++++++++++++----------------
 1 files changed, 25 insertions(+), 20 deletions(-)
---
diff --git a/en-US/The_Apache_HTTP_Server.xml b/en-US/The_Apache_HTTP_Server.xml
index 13516fb..3566618 100644
--- a/en-US/The_Apache_HTTP_Server.xml
+++ b/en-US/The_Apache_HTTP_Server.xml
@@ -263,14 +263,14 @@ httpd (pid 19014) is running...</screen>
           <term><option>&lt;IfDefine&gt;</option></term>
           <listitem>
             <para>
-              The <option>IfDefine</option> directive allows you to apply certain directives only if the selected parameter is supplied on the command line. It takes the following form:
+              The <option>IfDefine</option> directive allows you to use certain directives only when the selected parameter is supplied on the command line. It takes the following form:
             </para>
-            <screen>&lt;IfDefine <replaceable>parameter</replaceable>&gt;
+            <screen>&lt;IfDefine <optional>!</optional><replaceable>parameter</replaceable>&gt;
   <replaceable>directive</replaceable>
   &#8230;
 &lt;/IfDefine&gt;</screen>
             <para>
-              The <replaceable>parameter</replaceable> is a keyword that can be supplied at a shell prompt using the <option>-D</option><replaceable>parameter</replaceable> command line option (for example, <command>httpd -DEnableHome</command>).
+              The <replaceable>parameter</replaceable> can be supplied at a shell prompt using the <option>-D</option><replaceable>parameter</replaceable> command line option (for example, <command>httpd -DEnableHome</command>). If the optional exclamation mark (that is, <literal>!</literal>) is present, the enclosed directives are used only when the parameter is <emphasis>not</emphasis> specified.
             </para>
             <example id="example-apache-httpdconf-ifdefine">
               <title>Using the <option>&lt;IfDefine&gt;</option> directive</title>
@@ -281,6 +281,28 @@ httpd (pid 19014) is running...</screen>
           </listitem>
         </varlistentry>
         <varlistentry>
+          <term><option>&lt;IfModule&gt;</option></term>
+          <listitem>
+            <para>
+              The <option>&lt;IfModule&gt;</option> directive allows you to use certain directive only when the specified module is loaded. It takes the following form:
+            </para>
+            <screen>&lt;IfModule <optional>!</optional><replaceable>module</replaceable>&gt;
+  <replaceable>directive</replaceable>
+  &#8230;
+&lt;/IfModule&gt;</screen>
+            <para>
+              The <replaceable>module</replaceable> can be identified either by its name, or by the filename. If the optional exclamation mark (that is, <literal>!</literal>) is present, the enclosed directives are used only when the module is <emphasis>not</emphasis> loaded.
+            </para>
+            <example id="example-apache-httpdconf-ifmodule">
+              <title>Using the <option>&lt;IfModule&gt;</option> directive</title>
+              <screen>&lt;IfModule mod_disk_cache.c&gt;
+  CacheEnable disk /
+  CacheRoot /var/cache/mod_proxy
+&lt;/IfModule&gt;</screen>
+            </example>
+          </listitem>
+        </varlistentry>
+        <varlistentry>
           <term><option>AccessFileName</option></term>
           <listitem>
             <para>
@@ -2471,23 +2493,6 @@ ErrorDocument 404 /404-not_found.html</screen>
           </listitem>
         </varlistentry>
       </variablelist>
-      <formalpara id="s2-apache-ifmodule">
-        <title>IfModule</title>
-        <indexterm>
-          <primary><command>IfModule</command></primary>
-          <secondary>Apache configuration directive</secondary>
-        </indexterm>
-        <indexterm>
-          <primary>configuration directives, Apache</primary>
-          <secondary><command>IfModule</command></secondary>
-        </indexterm>
-        <para>
-          <command>&lt;IfModule&gt;</command> and <command>&lt;/IfModule&gt;</command> tags create a conditional container which are only activated if the specified module is loaded. Directives within the <command>IfModule</command> container are processed under one of two conditions. The directives are processed if the module contained within the starting <command>&lt;IfModule&gt;</command> tag is loaded. Or, if an exclamation point <keycap>!</keycap> appears before the module name, the directives are processed only if the module specified in the <command>&lt;IfModule&gt;</command> tag is <emphasis>not</emphasis> loaded.
-        </para>
-      </formalpara>
-      <para>
-        For more information about Apache HTTP Server modules, refer to <xref linkend="s1-apache-addmods" />.
-      </para>
       <formalpara id="s2-apache-location">
         <title>Location</title>
         <indexterm>


More information about the docs-commits mailing list