+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta name="generator" content="HTML Tidy, see www.w3.org" />
-
- <title>How Directory, Location and Files sections work</title>
- </head>
- <!-- Background white, links blue (unvisited), navy (visited), red (active) -->
-
- <body bgcolor="#FFFFFF" text="#000000" link="#0000FF"
- vlink="#000080" alink="#FF0000">
- <!--#include virtual="header.html" -->
-
- <h1 align="CENTER">How Directory, Location and Files sections
- work</h1>
-
- <p>The sections <a
- href="mod/core.html#directory"><code><Directory></code></a>,
- <a
- href="mod/core.html#location"><code><Location></code></a>
- and <a
- href="mod/core.html#files"><code><Files></code></a> can
- contain directives which only apply to specified directories,
- URLs or files respectively. Also htaccess files can be used
- inside a directory to apply directives to that directory. This
- document explains how these different sections differ and how
- they relate to each other when Apache decides which directives
- apply for a particular directory or request URL.</p>
-
- <h2>Directives allowed in the sections</h2>
-
- <p>Everything that is syntactically allowed in
- <code><Directory></code> is also allowed in
- <code><Location></code> (except a
- sub-<code><Files></code> section). Semantically, however
- some things, most notably <code>AllowOverride</code> and the
- two options <code>FollowSymLinks</code> and
- <code>SymLinksIfOwnerMatch</code>, make no sense in
- <code><Location></code>,
- <code><LocationMatch></code> or
- <code><DirectoryMatch></code>. The same for
- <code><Files></code> -- syntactically everything is fine,
- but semantically some things are different.</p>
-
- <h2>How the sections are merged</h2>
-
- <p>The order of merging is:</p>
-
- <ol>
- <li><code><Directory></code> (except regular
- expressions) and .htaccess done simultaneously (with
- .htaccess, if allowed, overriding
- <code><Directory></code>)</li>
-
- <li><code><DirectoryMatch></code>, and
- <code><Directory></code> with regular expressions</li>
-
- <li><code><Files></code> and
- <code><FilesMatch></code> done simultaneously</li>
-
- <li><code><Location></code> and
- <code><LocationMatch></code> done simultaneously</li>
- </ol>
-
- <p>Apart from <code><Directory></code>, each group is
- processed in the order that they appear in the configuration
- files. <code><Directory></code> (group 1 above) is
- processed in the order shortest directory component to longest.
- If multiple <code><Directory></code> sections apply to
- the same directory they are processed in the configuration
- file order. Configurations included
- via the <code>Include</code> directive will be treated as if
- they were inside the including file at the location of the
- <code>Include</code> directive.</p>
-
- <p>Sections inside <code><VirtualHost></code> sections
- are applied <em>after</em> the corresponding sections outside
- the virtual host definition. This allows virtual hosts to
- override the main server configuration.</p>
-
- <p>Later sections override earlier ones.</p>
-
- <h2>Notes about using sections</h2>
-
- <p>The general guidelines are:</p>
-
- <ul>
- <li>If you are attempting to match objects at the filesystem
- level then you must use <code><Directory></code> and/or
- <code><Files></code>.</li>
-
- <li>If you are attempting to match objects at the URL level
- then you must use <code><Location></code></li>
- </ul>
-
- <p>But a notable exception is:</p>
-
- <ul>
- <li>proxy control is done via <code><Directory></code>.
- This is a legacy mistake because the proxy existed prior to
- <code><Location></code>. A future version of the config
- language should probably switch this to
- <code><Location></code>.</li>
- </ul>
-
- <p>Note about .htaccess parsing:</p>
-
- <ul>
- <li>Modifying .htaccess parsing during Location doesn't do
- anything because .htaccess parsing has already occurred.</li>
- </ul>
-
- <p><code><Location></code> and symbolic links:</p>
-
- <ul>
- <li>It is not possible to use "<code>Options
- FollowSymLinks</code>" or "<code>Options
- SymLinksIfOwnerMatch</code>" inside a
- <code><Location></code>,
- <code><LocationMatch></code> or
- <code><DirectoryMatch></code> section (the options are
- simply ignored). Using the options in question is only
- possible inside a <code><Directory></code> section (or
- a <code>.htaccess</code> file).</li>
- </ul>
-
- <p><code><Files></code> and <code>Options</code>:</p>
-
- <ul>
- <li>Apache won't check for it, but using an
- <code>Options</code> directive inside a
- <code><Files></code> section has no effect.</li>
- </ul>
-
- <p>Another note:</p>
-
- <ul>
- <li>There is actually a
- <code><Location></code>/<code><LocationMatch></code>
- sequence performed just before the name translation phase
- (where <code>Aliases</code> and <code>DocumentRoots</code>
- are used to map URLs to filenames). The results of this
- sequence are completely thrown away after the translation has
- completed.</li>
- </ul>
- <!--#include virtual="footer.html" -->
- </body>
-</html>
-
--- /dev/null
+<?xml version="1.0" encoding="iso-2022-jp"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
+ <head>
+
+ <title>How Directory, Location and Files sections work</title>
+
+ </head>
+ <!-- English revision: 1.13 -->
+ <!-- Background white, links blue (unvisited), navy (visited), red (active) -->
+ <body bgcolor="#ffffff" text="#000000" link="#0000ff"
+ vlink="#000080" alink="#ff0000">
+ <!--#include virtual="header.html" -->
+
+ <h1 align="center">Directory, Location, Files
+ \e$B%;%/%7%g%s$NF0:nJ}K!\e(B</h1>
+
+ <p>\e$B%;%/%7%g%s\e(B <a
+ href="mod/core.html#directory"><code><Directory></code></a>,
+ <a
+ href="mod/core.html#location"><code><Location></code></a>, <a
+ href="mod/core.html#files"><code><Files></code></a>
+ \e$B$K$O!"$=$l$>$l;XDj$5$l$?%G%#%l%/%H%j!"\e(BURL,
+ \e$B%U%!%$%k$K$N$_E,MQ$5$l$k%G%#%l%/%F%#%V$r=q$/$3$H$,$G$-$^$9!#\e(B
+ \e$B$^$?!"%G%#%l%/%H%j$K%G%#%l%/%F%#%V$rE,MQ$9$k$?$a$K%G%#%l%/%H%jCf$K\e(B
+ .htaccess \e$B%U%!%$%k$r;HMQ$9$k$3$H$b$G$-$^$9!#$3$N%I%-%e%a%s%H$O\e(B
+ \e$B$3$l$i$N%;%/%7%g%s$N0c$$$r@bL@$7!"$=$l$i$H!"%G%#%l%/%H%j$d\e(B
+ \e$B%j%/%(%9%H$5$l$?\e(B URL \e$B$K\e(B Apache \e$B$,$I$N%G%#%l%/%F%#%V$r\e(B
+ \e$BE,MQ$9$k$+$r7hDj$9$kJ}K!$H$N4X78$r@bL@$7$^$9!#\e(B</p>
+
+ <h2>\e$B%;%/%7%g%sCf$K5v2D$5$l$F$$$k%G%#%l%/%F%#%V\e(B</h2>
+
+ <p>\e$B9=J8>e\e(B <code><Directory></code>
+ \e$B$K=q$1$k$b$N$O$9$Y$F\e(B <code><Location></code>
+ \e$B$K$b=q$/$3$H$,$G$-$^$9\e(B (<code><Files></code>
+ \e$B%;%/%7%g%s$ONc30$G$9\e(B)\e$B!#$7$+$7!"Cf$K$O\e(B
+ <code>AllowOverride</code> \e$B$d\e(B <code>FollowSymLinks</code>
+ \e$B$H\e(B <code>SymLinksIfOwnerMatch</code>
+ \e$B$H$$$&Fs$D$N%*%W%7%g%s$N$h$&$K!"\e(B<code><Location></code>,
+ <code><LocationMatch></code>,
+ <code><DirectoryMatch></code> \e$BCf$G$O0UL#$N$J$$$b$N$b$"$j$^$9!#\e(B
+ \e$BF1MM$N$3$H$,\e(B <code><Files></code>
+ \e$B$K$b8@$($^$9!#9=J8E*$K$O$9$Y$FBg>fIW$G$9$,!"\e(B
+ \e$B0UL#E*$K$O$=$&$G$J$$$b$N$b$"$j$^$9!#\e(B</p>
+
+ <h2>\e$B%;%/%7%g%s$N%^!<%8J}K!\e(B</h2>
+
+ <p>\e$B%^!<%8$N=gHV$O0J2<$N$h$&$K$J$C$F$$$^$9\e(B:</p>
+
+ <ol>
+ <li><code><Directory></code> (\e$B@55,I=8=L5$7\e(B) \e$B$H\e(B
+ .htaccess \e$B$rF1;~$K\e(B (.htaccess \e$B$,5v2D$5$l$F$$$l$P!"$=$l$,\e(B
+ <code><Directory></code> \e$B$r\e(B \e$B>e=q$-$7$^$9\e(B)
+ </li>
+
+ <li><code><DirectoryMatch></code> \e$B$H@55,I=8=$N$"$k\e(B
+ <code><Directory></code></li>
+
+ <li><code><Files></code> \e$B$H\e(B
+ <code><FilesMatch></code> \e$B$rF1;~$K\e(B</li>
+
+ <li><code><Location></code> \e$B$H\e(B
+ <code><LocationMatch></code> \e$B$rF1;~$K\e(B</li>
+ </ol>
+
+ <p><code><Directory></code>
+ \e$B0J30$O!"$=$l$>$l$N%0%k!<%W$O@_Dj%U%!%$%k$K8=$l$?=gHV$K=hM}$5$l$^$9!#\e(B
+ <code><Directory></code> (\e$B>e$N%0%k!<%W\e(B 1)
+ \e$B$O%G%#%l%/%H%j$,C;$$$b$N$+$iD9$$$b$N$X$H=hM}$5$l$^$9!#J#?t$N\e(B
+ <code><Directory></code> \e$B%;%/%7%g%s$,F1$8%G%#%l%/%H%j$K\e(B
+ \e$BE,MQ$5$l$k>l9g$O!"@_Dj%U%!%$%kCf$N=gHV$K=>$C$F=hM}$5$l$^$9!#\e(B
+ <code>Include</code>
+ \e$B$K$h$C$FA^F~$5$l$?@_Dj$O\e(B \e$BA^F~$7$F$$$k%U%!%$%k$N\e(B
+ <code>Include</code>
+ \e$B%G%#%l%/%F%#%V$N0LCV$K$"$C$?$+$N$h$&$K07$o$l$^$9!#\e(B</p>
+
+ <p><code><VirtualHost></code> \e$B%;%/%7%g%sCf$N%;%/%7%g%s$O\e(B
+ \e$B%P!<%A%c%k%[%9%H$NDj5A$N30B&$NBP1~$9$k%;%/%7%g%s$N\e(B
+ <em>\e$B8e\e(B</em>\e$B$KE,MQ$5$l$^$9!#$3$l$K$h$j%P!<%A%c%k%[%9%H$,\e(B
+ \e$B%a%$%s$N%5!<%P@_Dj$r>e=q$-$G$-$k$h$&$J$j$^$9!#\e(B</p>
+
+ <p>\e$B8e$N%;%/%7%g%s$N%G%#%l%/%F%#%V$,A0$N%;%/%7%g%s$N$b$N$r>e=q$-$7$^$9!#\e(B</p>
+
+ <h2>\e$B%;%/%7%g%s$r;H$&:]$NCm0U\e(B</h2>
+
+ <p>\e$B0lHLE*$J%,%$%I%i%$%s$O\e(B:</p>
+
+ <ul>
+ <li>\e$B%U%!%$%k%7%9%F%`%l%Y%k$G%*%V%8%'%/%H$N%^%C%A$r9T$J$&$H$-$O!"\e(B
+ <code><Directory></code> \e$B$H\e(B <code><Files></code>
+ \e$B$r;H$&I,MW$,$"$j$^$9!#\e(B</li>
+
+ <li>URL \e$B%l%Y%k$G%*%V%8%'%/%H$N%^%C%A$r9T$J$&$H$-$O\e(B
+ <code><Location></code> \e$B$r;H$&I,MW$,$"$j$^$9!#\e(B</li>
+ </ul>
+
+ <p>\e$B=EMW$JNc30$O\e(B:</p>
+
+ <ul>
+ <li>\e$B%W%m%-%7$N@)8f$O\e(B <code><Directory></code>
+ \e$B$rDL$7$F9T$J$o$l$^$9!#$3$l$O%W%m%-%7$,\e(B
+ <code><Location></code>
+ \e$B$h$jA0$+$iB8:_$7$?$3$H$K$h$k%_%9$G$9!#>-Mh$N@_Dj8@8l$G$O$*$=$i$/\e(B
+ <code><Location></code> \e$B$K@Z$jBX$($i$l$k$G$7$g$&!#\e(B</li>
+ </ul>
+
+ <p>.htaccess \e$B%U%!%$%k$N2r@O$K4X$9$kCm0U\e(B:</p>
+
+ <ul>
+ <li>Location \e$BCf$G\e(B .htaccess \e$B$N2r@OJ}K!$rJQ99$7$F$b!"\e(B
+ \e$B2?$bJQ$o$j$^$;$s!#\e(B.htaccess \e$B$N2r@O$O4{$K=*$o$C$F$$$k$+$i$G$9!#\e(B</li>
+ </ul>
+
+ <p><code><Location></code> \e$B$H%7%s%\%j%C%/%j%s%/\e(B:</p>
+
+ <ul>
+ <li>"<code>Options FollowSymLinks</code>" \e$B$d\e(B
+ "<code>Options SymLinksIfOwnerMatch</code>" \e$B$O\e(B
+ <code><Location></code>,
+ <code><LocationMatch></code>,
+ <code><DirectoryMatch></code>
+ \e$B%;%/%7%g%s$G$O;H$&$3$H$,$G$-$^$;$s\e(B
+ (\e$B$=$l$i$N%*%W%7%g%s$OC1$KL5;k$5$l$^$9\e(B)\e$B!#$=$l$i$N%*%W%7%g%s$O\e(B
+ <code><Directory></code> \e$B%;%/%7%g%s\e(B (\e$B$b$7$/$O\e(B
+ <code>.htaccess</code> \e$B%U%!%$%k\e(B) \e$B$NCf$G$N$_;HMQ2DG=$G$9!#\e(B</li>
+ </ul>
+
+ <p><code><Files></code> \e$B$H\e(B <code>Options</code>:</p>
+
+ <ul>
+ <li>Apache \e$B$O$3$N>u67$O%A%'%C%/$7$^$;$s$,!"\e(B
+ <code><Files></code> \e$B%;%/%7%g%s$NCf$G\e(B <code>Options</code>
+ \e$B%G%#%l%/%F%#%V$r;HMQ$7$F$b8z2L$O$"$j$^$;$s!#\e(B</li>
+ </ul>
+
+ <p>\e$BB>$NCm0U\e(B:</p>
+
+ <ul>
+ <li>\e$B<B:]$K$O!"L>A0$rJQ49$9$kCJ3,\e(B (URL
+ \e$B$r%U%!%$%kL>$K%^%C%W$9$k$?$a$K\e(B <code>Alias</code> \e$B$d\e(B
+ <code>DocumentRoot</code> \e$B$,;HMQ$5$l$k$H$3$m\e(B) \e$B$ND>A0$K\e(B
+ <code><Location></code>/<code><LocationMatch></code>
+ \e$B$,9T$J$o$l$^$9!#\e(B
+ \e$B$3$l$i$rE,MQ$7$?7k2L$OJQ49$,=*$o$C$?8e$K40A4$K<N$F$i$l$^$9!#\e(B
+ </li>
+ </ul>
+ <!--#include virtual="footer.html" -->
+ </body>
+</html>
+