diff options
author | Ken Coar <coar@apache.org> | 2015-04-14 22:19:49 +0000 |
---|---|---|
committer | Ken Coar <coar@apache.org> | 2015-04-14 22:19:49 +0000 |
commit | 09adb8097877afcc689379b09687878c78183587 (patch) | |
tree | 297918b719682f049ac8e0f557f76c0c0db10b6d /docs/manual/sections.html.en | |
parent | a388b842278920701ab164f78423e7239c2ff84b (diff) | |
download | httpd-09adb8097877afcc689379b09687878c78183587.tar.gz |
Build..
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1673568 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/sections.html.en')
-rw-r--r-- | docs/manual/sections.html.en | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/docs/manual/sections.html.en b/docs/manual/sections.html.en index 92c341917b..c1191337a0 100644 --- a/docs/manual/sections.html.en +++ b/docs/manual/sections.html.en @@ -63,7 +63,7 @@ to another site only if the server is started using <code>httpd -DClosedForNow</code>:</p> <pre class="prettyprint lang-config"><IfDefine ClosedForNow> - Redirect / http://otherserver.example.com/ + Redirect "/" "http://otherserver.example.com/" </IfDefine></pre> @@ -82,7 +82,7 @@ about missing modules.</p> applied only if <code class="module"><a href="./mod/mod_mime_magic.html">mod_mime_magic</a></code> is available.</p> <pre class="prettyprint lang-config"><IfModule mod_mime_magic.c> - MimeMagicFile conf/magic + MimeMagicFile "conf/magic" </IfModule></pre> @@ -138,7 +138,7 @@ The same effect can be obtained using <a href="howto/htaccess.html">.htaccess fi following configuration, directory indexes will be enabled for the <code>/var/web/dir1</code> directory and all subdirectories.</p> -<pre class="prettyprint lang-config"><Directory /var/web/dir1> +<pre class="prettyprint lang-config"><Directory "/var/web/dir1"> Options +Indexes </Directory></pre> @@ -150,7 +150,7 @@ when placed in the main section of the configuration file, deny access to any file named <code>private.html</code> regardless of where it is found.</p> -<pre class="prettyprint lang-config"><Files private.html> +<pre class="prettyprint lang-config"><Files "private.html"> Require all denied </Files></pre> @@ -165,8 +165,8 @@ access to <code>/var/web/dir1/private.html</code>, of <code>private.html</code> found under the <code>/var/web/dir1/</code> directory.</p> -<pre class="prettyprint lang-config"><Directory /var/web/dir1> - <Files private.html> +<pre class="prettyprint lang-config"><Directory "/var/web/dir1"> + <Files "private.html"> Require all denied </Files> </Directory></pre> @@ -186,7 +186,7 @@ In particular, it will apply to requests for <code>http://yoursite.example.com/private/dir/file.html</code> as well as any other requests starting with the <code>/private</code> string.</p> -<pre class="prettyprint lang-config"><LocationMatch ^/private> +<pre class="prettyprint lang-config"><LocationMatch "^/private"> Require all denied </LocationMatch></pre> @@ -198,7 +198,7 @@ URL to an internal Apache HTTP Server handler provided by <code class="module">< No file called <code>server-status</code> needs to exist in the filesystem.</p> -<pre class="prettyprint lang-config"><Location /server-status> +<pre class="prettyprint lang-config"><Location "/server-status"> SetHandler server-status </Location></pre> @@ -208,20 +208,20 @@ filesystem.</p> <p>In order to have two overlapping URLs one has to consider the order in which certain sections or directives are evaluated. For <code class="directive"><a href="./mod/core.html#location"><Location></a></code> this would be:</p> -<pre class="prettyprint lang-config"><Location /foo> +<pre class="prettyprint lang-config"><Location "/foo"> </Location> -<Location /foo/bar> +<Location "/foo/bar"> </Location></pre> <p><code class="directive"><a href="./mod/mod_alias.html#alias"><Alias></a></code>es on the other hand, are mapped vice-versa:</p> -<pre class="prettyprint lang-config">Alias /foo/bar /srv/www/uncommon/bar -Alias /foo /srv/www/common/foo</pre> +<pre class="prettyprint lang-config">Alias "/foo/bar" "/srv/www/uncommon/bar" +Alias "/foo" "/srv/www/common/foo"</pre> <p>The same is true for the <code class="directive"><a href="./mod/mod_proxy.html#proxypass">ProxyPass</a></code> directives:</p> -<pre class="prettyprint lang-config">ProxyPass /special-area http://special.example.com smax=5 max=10 -ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On</pre> +<pre class="prettyprint lang-config">ProxyPass "/special-area" "http://special.example.com" smax=5 max=10 +ProxyPass "/" "balancer://mycluster/" stickysession=JSESSIONID|jsessionid nofailover=On</pre> @@ -248,14 +248,14 @@ how directives are applied.</p> <p>A non-regex wildcard section that changes the configuration of all user directories could look as follows:</p> -<pre class="prettyprint lang-config"><Directory /home/*/public_html> +<pre class="prettyprint lang-config"><Directory "/home/*/public_html"> Options Indexes </Directory></pre> <p>Using regex sections, we can deny access to many types of image files at once:</p> -<pre class="prettyprint lang-config"><FilesMatch \.(?i:gif|jpe?g|png)$> +<pre class="prettyprint lang-config"><FilesMatch "\.(?i:gif|jpe?g|png)$"> Require all denied </FilesMatch></pre> @@ -266,8 +266,8 @@ corresponding name in uppercase. This allows elements of filename paths and URLs to be referenced from within <a href="expr.html">expressions</a> and modules like <code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code>.</p> -<pre class="prettyprint lang-config"><DirectoryMatch ^/var/www/combined/(?<SITENAME>[^/]+)> - require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example +<pre class="prettyprint lang-config"><DirectoryMatch "^/var/www/combined/(?<SITENAME>[^/]+)"> + require ldap-group "cn=%{env:MATCH_SITENAME},ou=combined,o=Example" </DirectoryMatch></pre> @@ -300,7 +300,7 @@ different webspace locations (URLs) could map to the same filesystem location, allowing your restrictions to be circumvented. For example, consider the following configuration:</p> -<pre class="prettyprint lang-config"><Location /dir/> +<pre class="prettyprint lang-config"><Location "/dir/"> Require all denied </Location></pre> @@ -324,7 +324,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> @@ -363,7 +363,7 @@ that match the specified URL. For example, the following configuration will prevent the proxy server from being used to access the <code>www.example.com</code> website.</p> -<pre class="prettyprint lang-config"><Proxy http://www.example.com/*> +<pre class="prettyprint lang-config"><Proxy "http://www.example.com/*"> Require all granted </Proxy></pre> @@ -416,7 +416,7 @@ are interpreted, it is important to understand how this works.</p> <code class="directive"><a href="./mod/core.html#directory"><Directory></a></code>)</li> <li><code class="directive"><a href="./mod/core.html#directorymatch"><DirectoryMatch></a></code> - (and <code><Directory ~></code>)</li> + (and <code><Directory "~"></code>)</li> <li><code class="directive"><a href="./mod/core.html#files"><Files></a></code> and <code class="directive"><a href="./mod/core.html#filesmatch"><FilesMatch></a></code> done simultaneously</li> @@ -432,9 +432,9 @@ are interpreted, it is important to understand how this works.</p> <p>Apart from <code class="directive"><a href="./mod/core.html#directory"><Directory></a></code>, each group is processed in the order that they appear in the configuration files. <code class="directive"><a href="./mod/core.html#directory"><Directory></a></code> (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 <code class="directive"><a href="./mod/core.html#directory"><Directory></a></code> sections apply + "/var/web/dir/subdir"></code>. If multiple <code class="directive"><a href="./mod/core.html#directory"><Directory></a></code> sections apply to the same directory they are processed in the configuration file order. Configurations included via the <code class="directive"><a href="./mod/core.html#include">Include</a></code> directive will be treated as if they were inside the including file at the location of the @@ -474,16 +474,16 @@ merging. Assuming they all apply to the request, the directives in this example will be applied in the order A > B > C > D > E.</p> -<pre class="prettyprint lang-config"><Location /> +<pre class="prettyprint lang-config"><Location "/"> E </Location> -<Files f.html> +<Files "f.html"> D </Files> <VirtualHost *> -<Directory /a/b> +<Directory "/a/b"> B </Directory> </VirtualHost> @@ -492,7 +492,7 @@ E.</p> C </DirectoryMatch> -<Directory /a/b> +<Directory "/a/b"> A </Directory></pre> @@ -502,12 +502,12 @@ any access restrictions placed in <code class="directive"><a href="./mod/core.ht evaluated last and will allow unrestricted access to the server. In other words, order of merging is important, so be careful!</p> -<pre class="prettyprint lang-config"><Location /> +<pre class="prettyprint lang-config"><Location "/"> Require all granted </Location> # Woops! This <Directory> section will have no effect -<Directory /> +<Directory "/"> <RequireAll> Require all granted Require not host badguy.example.com |