httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1060606 - /httpd/httpd/trunk/docs/manual/sections.xml
Date Tue, 18 Jan 2011 22:50:44 GMT
Author: sf
Date: Tue Jan 18 22:50:44 2011
New Revision: 1060606

URL: http://svn.apache.org/viewvc?rev=1060606&view=rev
Log:
Briefly describe <If> sections and how they are merged.

Modified:
    httpd/httpd/trunk/docs/manual/sections.xml

Modified: httpd/httpd/trunk/docs/manual/sections.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/sections.xml?rev=1060606&r1=1060605&r2=1060606&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/sections.xml (original)
+++ httpd/httpd/trunk/docs/manual/sections.xml Tue Jan 18 22:50:44 2011
@@ -128,7 +128,7 @@ Also, these sections can be nested to ac
 restrictions.</p>
 </section>
 
-<section id="file-and-web"><title>Filesystem and Webspace</title>
+<section id="file-and-web"><title>Filesystem, Webspace, and Boolean Expressions</title>
 
 <p>The most commonly used configuration section containers are the
 ones that change the configuration of particular places in the
@@ -304,6 +304,20 @@ Deny from all<br />
 
 </section>
 
+<section id="expressions"><title>Boolean expressions</title>
+<p>The <directive type="section" module="core">If</directive>
+directive change the configuration depending on a condition which can be
+expressed by a boolean expression. For example, the following configuration
+denies access if the HTTP Referer header does not start with
+"http://www.example.com/".</p>
+<example>
+&lt;If "!(%{HTTP_REFERER} -strmatch 'http://www.example.com/*')"&gt;<br />
+Require all denied<br />
+&lt;/If&gt;
+</example>
+
+</section>
+
 <section id="whichwhen"><title>What to use When</title>
 
 <p>Choosing between filesystem containers and webspace containers is
@@ -354,6 +368,21 @@ rule.  Putting configuration restriction
 to all requests regardless of the specific URL.</p>
 </section>
 
+<section id="nesting"><title>Nesting of sections</title>
+
+<p>Some section types can be nested inside other section types. One the one
+hand, <directive type="section" module="core">File</directive> can be used
+inside <directive type="section" module="core">Directory</directive>.  On
+the other hand, <directive type="section" module="core">If</directive> can
+be used inside <directive type="section" module="core">Directory</directive>,
+<directive type="section" module="core">Location</directive>, and <directive
+type="section" module="core">Files</directive> sections. The regex
+counterparts of the named section behave identically.</p>
+
+<p>Nested sections are merged after non-nested sections of the same type.</p>
+
+</section>
+
 </section>
 
 <section id="virtualhost"><title>Virtual Hosts</title>
@@ -444,6 +473,10 @@ are interpreted, it is important to unde
       <li><directive type="section" module="core">Location</directive>
       and <directive type="section"
       module="core">LocationMatch</directive> done simultaneously</li>
+
+      <li><directive type="section" module="core">If</directive>
+      </li>
+
     </ol>
 
     <p>Apart from <directive type="section"



Mime
View raw message