]> granicus.if.org Git - apache/commitdiff
PR:
authorbrian <brian@unknown>
Tue, 16 Jun 1998 03:37:15 +0000 (03:37 +0000)
committerbrian <brian@unknown>
Tue, 16 Jun 1998 03:37:15 +0000 (03:37 +0000)
Submitted by: Ralf Engelschall
Reviewed by: Brian Behlendorf

  *) Add <IfDefine>..</IfDefine> sections to the core module (with same spirit
     as <IfModule>..</IfModule> sections) which can be used to skip or process
     contained commands dependend of ``-D PARAMETER'' options on the command
     line.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@81563 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/core.html
docs/manual/mod/directives.html

index 46238fdd60e3010e05619333603ab40aebe03830..17e644ac7692451d1a08253129032bf52df7a136 100644 (file)
@@ -43,6 +43,7 @@ always available.
 <LI><A HREF="#group">Group</A>
 <LI><A HREF="#hostnamelookups">HostNameLookups</A>
 <LI><A HREF="#identitycheck">IdentityCheck</A>
+<LI><A HREF="#ifdefine">&lt;IfDefine&gt;</A>
 <LI><A HREF="#ifmodule">&lt;IfModule&gt;</A>
 <LI><A HREF="#include">Include</A>
 <LI><A HREF="#keepalive">KeepAlive</A>
@@ -1084,6 +1085,73 @@ of latency to each hit.  So in general this is not very useful on public
 servers accessible from the Internet.
 <P><HR>
 
+<H2><A NAME="ifdefine">&lt;IfDefine&gt; directive</A></H2>
+<A
+ HREF="directive-dict.html#Syntax"
+ REL="Help"
+><STRONG>Syntax:</STRONG></A> &lt;IfDefine [!]<EM>parameter-name</EM>&gt; <EM>...</EM>
+&lt;/IfDefine&gt;<BR>
+<A
+ HREF="directive-dict.html#Default"
+ REL="Help"
+><STRONG>Default:</STRONG></A> None<BR>
+<A
+ HREF="directive-dict.html#Context"
+ REL="Help"
+><STRONG>Context:</STRONG></A> all<BR>
+<A
+ HREF="directive-dict.html#Status"
+ REL="Help"
+><STRONG>Status:</STRONG></A> Core<BR>
+<A
+ HREF="directive-dict.html#Compatibility"
+ REL="Help"
+><STRONG>Compatibility:</STRONG></A> &lt;IfDefine&gt; is only available in 1.3 and
+later.<P>
+
+<P>
+
+The &lt;IfDefine <EM>test</EM>&gt;...&lt;/IfDefine&gt;
+section is used to mark directives that are conditional. The
+directives within an IfDefine section are only
+processed if the <EM>test</EM> is true. If <EM>test</EM>
+is false, everything between the start and end markers
+is ignored.<P>
+
+The <EM>test</EM> in the &lt;IfDefine&gt; section directive
+can be one of two forms:
+
+<UL>
+<LI><EM>parameter-name</EM>
+<LI><CODE>!</CODE><EM>parameter-name</EM>
+</UL>
+
+<P>In the former case, the directives between the start and end markers are
+only processed if the parameter named <EM>parameter-name</EM> is defined.
+The second format reverses the test, and only processes the directives if
+<EM>parameter-name</EM> is <STRONG>not</STRONG> defined.
+
+<P>The <EM>paramater-name</EM> argument is a define as given on the
+<CODE>httpd</CODE> command line via <CODE>-D</CODE><EM>parameter-</EM>, at the
+time the server was started.
+
+<P>&lt;IfDefine&gt; sections are nest-able, which can be used to implement
+simple multiple-parameter tests.
+
+Example:
+
+<PRE>
+  $ httpd -DReverseProxy ...
+
+  # httpd.conf
+  &lt;IfDefine ReverseProxy&gt;
+  LoadModule rewrite_module libexec/mod_rewrite.so
+  LoadModule proxy_module   libexec/libproxy.so
+  &lt;/IfDefine&gt;
+</PRE>
+
+<P> <HR>
+
 <H2><A NAME="ifmodule">&lt;IfModule&gt; directive</A></H2>
 <A
  HREF="directive-dict.html#Syntax"
index 53b31ffe5c28dfacbf8c14ca0a31f8834f1bb5a1..a5a19944c5200f6d03b45a7b44849b0f241c42c6 100644 (file)
@@ -108,6 +108,7 @@ of the terms used in their descriptions available.
 <LI><A HREF="mod_autoindex.html#headername">HeaderName</A>
 <LI><A HREF="core.html#hostnamelookups">HostNameLookups</A>
 <LI><A HREF="core.html#identitycheck">IdentityCheck</A>
+<LI><A HREF="core.html#ifdefine">&lt;IfDefine&gt;</A>
 <LI><A HREF="core.html#ifmodule">&lt;IfModule&gt;</A>
 <LI><A HREF="mod_imap.html#imapbase">ImapBase</A>
 <LI><A HREF="mod_imap.html#imapdefault">ImapDefault</A>