From a822a3c65f3ef914c13fdf9b95a9960e83103a8e Mon Sep 17 00:00:00 2001
From: Eric Covener
Date: Tue, 30 Nov 2010 22:10:27 +0000
Subject: [PATCH] Merge r1040808 from trunk:
PR50375: has bad example in sections.xml and never actually explains what's matched
in core.xml.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1040809 13f79535-47bb-0310-9956-ffa450edef68
---
docs/manual/mod/core.xml | 30 +++++++++++++++++++++++++++++-
docs/manual/sections.xml | 2 +-
2 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/docs/manual/mod/core.xml b/docs/manual/mod/core.xml
index 2cfcf2bc7de..af4eb36cb6c 100644
--- a/docs/manual/mod/core.xml
+++ b/docs/manual/mod/core.xml
@@ -1134,7 +1134,7 @@ in case of an error
anyone other than the user that starts the server.
Note
When entering a file path on non-Unix platforms, care should be taken
- to make sure that only forward slashed are used even though the platform
+ to make sure that only forward slashes are used even though the platform
may allow the use of back slashes. In general it is a good idea to always
use forward slashes throughout the configuration files.
@@ -1999,6 +1999,34 @@ URLs
locations. Since several different URLs may map to the same
filesystem location, such access controls may by circumvented.
+ The enclosed directives will be applied to the request if the path component
+ of the URL meets any of the following criteria:
+
+ - The specified location matches exactly the path component of the URL.
+
+ - The specified location, which ends in a forward slash, is a prefix
+ of the path component of the URL (treated as a context root).
+
+ - The specified location, with the addition of a trailing slash, is a
+ prefix of the path component of the URL (also treated as a context root).
+
+
+ In the example below, where no trailing slash is used, requests to
+ /private1, /private1/ and /private1/file.txt will have the enclosed
+ directives applied, but /private1other would not.
+
+ <Location /private1>
+ ...
+
+ In the example below, where a trailing slash is used, requests to
+ /private2/ and /private2/file.txt will have the enclosed
+ directives applied, but /private2 and /private2other would not.
+
+ <Location /private2/>
+ ...
+
+
+
When to use Location
diff --git a/docs/manual/sections.xml b/docs/manual/sections.xml
index fcaea3a2ac2..59648162339 100644
--- a/docs/manual/sections.xml
+++ b/docs/manual/sections.xml
@@ -216,7 +216,7 @@ In particular, it will apply to requests for
as any other requests starting with the /private
string.
-<Location /private>
+<LocationMatch ^/private>
Order Allow,Deny
Deny from all
</Location>
--
2.47.2