From: Stefan Fritsch Date: Tue, 18 Jan 2011 22:50:44 +0000 (+0000) Subject: Briefly describe sections and how they are merged. X-Git-Tag: 2.3.11~165 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6e5b53facfbfbf437f06e89b3b75cfded93385b6;p=apache Briefly describe sections and how they are merged. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1060606 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/sections.xml b/docs/manual/sections.xml index 344b55821c..91e6ea9e80 100644 --- a/docs/manual/sections.xml +++ b/docs/manual/sections.xml @@ -128,7 +128,7 @@ Also, these sections can be nested to achieve more complex restrictions.

-
Filesystem and Webspace +
Filesystem, Webspace, and Boolean Expressions

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

+
Boolean expressions +

The If +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/".

+ +<If "!(%{HTTP_REFERER} -strmatch 'http://www.example.com/*')">
+Require all denied
+</If> +
+ +
+
What to use When

Choosing between filesystem containers and webspace containers is @@ -354,6 +368,21 @@ rule. Putting configuration restrictions in a <Location to all requests regardless of the specific URL.

+
Nesting of sections + +

Some section types can be nested inside other section types. One the one +hand, File can be used +inside Directory. On +the other hand, If can +be used inside Directory, +Location, and Files sections. The regex +counterparts of the named section behave identically.

+ +

Nested sections are merged after non-nested sections of the same type.

+ +
+
Virtual Hosts @@ -444,6 +473,10 @@ are interpreted, it is important to understand how this works.

  • Location and LocationMatch done simultaneously
  • + +
  • If +
  • +

    Apart from