diff options
author | Ken Coar <coar@apache.org> | 2015-04-15 17:46:53 +0000 |
---|---|---|
committer | Ken Coar <coar@apache.org> | 2015-04-15 17:46:53 +0000 |
commit | 57ef10245b3cf962dcbe40d205d94c241bed7f0e (patch) | |
tree | 596b4aacaa742456ddd5a457f712481ae85dffc2 /docs/manual/sections.xml | |
parent | bde73e543b8457c707afcc7721fd89cd889bce37 (diff) | |
download | httpd-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.xml | 44 |
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"> -<Directory /var/web/dir1> +<Directory "/var/web/dir1"> Options +Indexes </Directory> </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"> -<Files private.html> +<Files "private.html"> Require all denied </Files> </highlight> @@ -191,8 +191,8 @@ of <code>private.html</code> found under the <code>/var/web/dir1/</code> directory.</p> <highlight language="config"> -<Directory /var/web/dir1> - <Files private.html> +<Directory "/var/web/dir1"> + <Files "private.html"> Require all denied </Files> </Directory> @@ -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"> -<LocationMatch ^/private> +<LocationMatch "^/private"> Require all denied </LocationMatch> </highlight> @@ -226,7 +226,7 @@ No file called <code>server-status</code> needs to exist in the filesystem.</p> <highlight language="config"> -<Location /server-status> +<Location "/server-status"> SetHandler server-status </Location> </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"> -<Location /foo> +<Location "/foo"> </Location> -<Location /foo/bar> +<Location "/foo/bar"> </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"> -<Directory /home/*/public_html> +<Directory "/home/*/public_html"> Options Indexes </Directory> </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"> -<FilesMatch \.(?i:gif|jpe?g|png)$> +<FilesMatch "\.(?i:gif|jpe?g|png)$"> Require all denied </FilesMatch> </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"> -<DirectoryMatch ^/var/www/combined/(?<SITENAME>[^/]+)> +<DirectoryMatch "^/var/www/combined/(?<SITENAME>[^/]+)"> require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example </DirectoryMatch> </highlight> @@ -343,7 +343,7 @@ location, allowing your restrictions to be circumvented. For example, consider the following configuration:</p> <highlight language="config"> -<Location /dir/> +<Location "/dir/"> Require all denied </Location> </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><Location -/></code> section is perfectly safe because this section will apply +"/"></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><Directory /var/web/dir></code> will + So for example, <code><Directory "/var/web/dir"></code> will be processed before <code><Directory - /var/web/dir/subdir></code>. If multiple <directive + "/var/web/dir/subdir"></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 > B > C > D > E.</p> <highlight language="config"> -<Location /> +<Location "/"> E </Location> -<Files f.html> +<Files "f.html"> D </Files> <VirtualHost *> -<Directory /a/b> +<Directory "/a/emphasis role="bold""> B </Directory> </VirtualHost> @@ -553,7 +553,7 @@ E.</p> C </DirectoryMatch> -<Directory /a/b> +<Directory "/a/b> A </Directory> @@ -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"> -<Location /> +<Location "/"> Require all granted </Location> -# Woops! This <Directory> section will have no effect -<Directory /> +# Whoops! This <Directory> section will have no effect +<Directory "/"> <RequireAll> Require all granted Require not host badguy.example.com |