summaryrefslogtreecommitdiff
path: root/docs/manual/sections.xml
diff options
context:
space:
mode:
authorKen Coar <coar@apache.org>2015-04-15 17:46:53 +0000
committerKen Coar <coar@apache.org>2015-04-15 17:46:53 +0000
commit57ef10245b3cf962dcbe40d205d94c241bed7f0e (patch)
tree596b4aacaa742456ddd5a457f712481ae85dffc2 /docs/manual/sections.xml
parentbde73e543b8457c707afcc7721fd89cd889bce37 (diff)
downloadhttpd-57ef10245b3cf962dcbe40d205d94c241bed7f0e.tar.gz
Enclose parameters in quotation marks for <{Files,Directory,Location}{,Match}>
containers. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1673892 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/sections.xml')
-rw-r--r--docs/manual/sections.xml44
1 files changed, 22 insertions, 22 deletions
diff --git a/docs/manual/sections.xml b/docs/manual/sections.xml
index a2d0f27f73..0a9bd162f7 100644
--- a/docs/manual/sections.xml
+++ b/docs/manual/sections.xml
@@ -161,7 +161,7 @@ following configuration, directory indexes will be enabled for the
<code>/var/web/dir1</code> directory and all subdirectories.</p>
<highlight language="config">
-&lt;Directory /var/web/dir1&gt;
+&lt;Directory "/var/web/dir1"&gt;
Options +Indexes
&lt;/Directory&gt;
</highlight>
@@ -175,7 +175,7 @@ deny access to any file named <code>private.html</code> regardless
of where it is found.</p>
<highlight language="config">
-&lt;Files private.html&gt;
+&lt;Files "private.html"&gt;
Require all denied
&lt;/Files&gt;
</highlight>
@@ -191,8 +191,8 @@ of <code>private.html</code> found under the <code>/var/web/dir1/</code>
directory.</p>
<highlight language="config">
-&lt;Directory /var/web/dir1&gt;
- &lt;Files private.html&gt;
+&lt;Directory "/var/web/dir1"&gt;
+ &lt;Files "private.html"&gt;
Require all denied
&lt;/Files&gt;
&lt;/Directory&gt;
@@ -213,7 +213,7 @@ In particular, it will apply to requests for
as any other requests starting with the <code>/private</code> string.</p>
<highlight language="config">
-&lt;LocationMatch ^/private&gt;
+&lt;LocationMatch "^/private"&gt;
Require all denied
&lt;/LocationMatch&gt;
</highlight>
@@ -226,7 +226,7 @@ No file called <code>server-status</code> needs to exist in the
filesystem.</p>
<highlight language="config">
-&lt;Location /server-status&gt;
+&lt;Location "/server-status"&gt;
SetHandler server-status
&lt;/Location&gt;
</highlight>
@@ -237,9 +237,9 @@ filesystem.</p>
certain sections or directives are evaluated. For
<directive type="section" module="core">Location</directive> this would be:</p>
<highlight language="config">
-&lt;Location /foo&gt;
+&lt;Location "/foo"&gt;
&lt;/Location&gt;
-&lt;Location /foo/bar&gt;
+&lt;Location "/foo/bar"&gt;
&lt;/Location>
</highlight>
<p><directive type="section" module="mod_alias">Alias</directive>es on the other hand,
@@ -283,7 +283,7 @@ how directives are applied.</p>
all user directories could look as follows:</p>
<highlight language="config">
-&lt;Directory /home/*/public_html&gt;
+&lt;Directory "/home/*/public_html"&gt;
Options Indexes
&lt;/Directory&gt;
</highlight>
@@ -291,7 +291,7 @@ all user directories could look as follows:</p>
<p>Using regex sections, we can deny access to many types of image files
at once:</p>
<highlight language="config">
-&lt;FilesMatch \.(?i:gif|jpe?g|png)$&gt;
+&lt;FilesMatch "\.(?i:gif|jpe?g|png)$"&gt;
Require all denied
&lt;/FilesMatch&gt;
</highlight>
@@ -303,7 +303,7 @@ and URLs to be referenced from within <a href="expr.html">expressions</a>
and modules like <module>mod_rewrite</module>.</p>
<highlight language="config">
-&lt;DirectoryMatch ^/var/www/combined/(?&lt;SITENAME&gt;[^/]+)&gt;
+&lt;DirectoryMatch "^/var/www/combined/(?&lt;SITENAME&gt;[^/]+)"&gt;
require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
&lt;/DirectoryMatch&gt;
</highlight>
@@ -343,7 +343,7 @@ location, allowing your restrictions to be circumvented.
For example, consider the following configuration:</p>
<highlight language="config">
-&lt;Location /dir/&gt;
+&lt;Location "/dir/"&gt;
Require all denied
&lt;/Location&gt;
</highlight>
@@ -369,7 +369,7 @@ many other ways to map multiple webspace locations to the same
filesystem location. Therefore you should always use the filesystem
containers when you can. There is, however, one exception to this
rule. Putting configuration restrictions in a <code>&lt;Location
-/&gt;</code> section is perfectly safe because this section will apply
+"/"&gt;</code> section is perfectly safe because this section will apply
to all requests regardless of the specific URL.</p>
</section>
@@ -488,9 +488,9 @@ are interpreted, it is important to understand how this works.</p>
the order that they appear in the configuration files. <directive
type="section" module="core">Directory</directive> (group 1 above)
is processed in the order shortest directory component to longest.
- So for example, <code>&lt;Directory /var/web/dir&gt;</code> will
+ So for example, <code>&lt;Directory "/var/web/dir"&gt;</code> will
be processed before <code>&lt;Directory
- /var/web/dir/subdir&gt;</code>. If multiple <directive
+ "/var/web/dir/subdir"&gt;</code>. If multiple <directive
type="section" module="core">Directory</directive> sections apply
to the same directory they are processed in the configuration file
order. Configurations included via the <directive
@@ -535,16 +535,16 @@ this example will be applied in the order A &gt; B &gt; C &gt; D &gt;
E.</p>
<highlight language="config">
-&lt;Location /&gt;
+&lt;Location "/"&gt;
E
&lt;/Location&gt;
-&lt;Files f.html&gt;
+&lt;Files "f.html"&gt;
D
&lt;/Files&gt;
&lt;VirtualHost *&gt;
-&lt;Directory /a/b&gt;
+&lt;Directory "/a/emphasis role="bold""&gt;
B
&lt;/Directory&gt;
&lt;/VirtualHost&gt;
@@ -553,7 +553,7 @@ E.</p>
C
&lt;/DirectoryMatch&gt;
-&lt;Directory /a/b&gt;
+&lt;Directory "/a/b&gt;
A
&lt;/Directory&gt;
@@ -567,12 +567,12 @@ evaluated last and will allow unrestricted access to the server. In
other words, order of merging is important, so be careful!</p>
<highlight language="config">
-&lt;Location /&gt;
+&lt;Location "/"&gt;
Require all granted
&lt;/Location&gt;
-# Woops! This &lt;Directory&gt; section will have no effect
-&lt;Directory /&gt;
+# Whoops! This &lt;Directory&gt; section will have no effect
+&lt;Directory "/"&gt;
&lt;RequireAll&gt;
Require all granted
Require not host badguy.example.com