|
|
|
|
Quelle core.html.ja.utf8
Sprache: unbekannt
|
|
Spracherkennung für: .utf8 vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
<!--
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This file is generated from xml source: DO NOT EDIT
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-->
<title>core - Apache HTTP サーバ バージョン 2.4</title>
<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" titl e="Main stylesheet" />
<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
<script src="../style/scripts/prettify.min.js" type="text/javascript">
</script>
<link href="../images/favicon.ico" rel="shortcut icon" /></head>
<body>
<div id="page-header">
<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p>
<p class="apache">Apache HTTP サーバ バージョン 2.4</p>
<img alt="" src="../images/feather.png" /></div>
<div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
<div id="path">
<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP サーバ</a> > <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> > <a href="../">バージョン 2.4</a> > <a href="./">モジュール</a></div>
<div id="page-content">
<div id="preamble"><h1>Apache コア機能</h1>
<div class="toplang">
<p><span>翻訳済み言語: </span><a href="../de/mod/core.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> |
<a href="../en/mod/core.html" hreflang="en" rel="alternate" title="English"> en </a> |
<a href="../es/mod/core.html" hreflang="es" rel="alternate" title="Español"> es </a> |
<a href="../fr/mod/core.html" hreflang="fr" rel="alternate" title="Français"> fr </a> |
<a href="../ja/mod/core.html" title="Japanese"> ja </a> |
<a href="../tr/mod/core.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p>
</div>
<div class="outofdate">この日本語訳はすでに古くなっている
可能性があります。
最近更新された内容を見るには英語版をご覧下さい。
</div>
<table class="module"><tr><th><a href="module-dict.html#Description">説明:</a></th><td>常に使用可能な Apache HTTP サーバのコア機能</td></tr>
<tr><th><a href="module-dict.html#Status">ステータス:</a></th><td>Core</td></tr></table>
</div>
<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><h3 class="directives">ディレクティブ</h3>
<ul id="toc">
<li><img alt="" src="../images/down.gif" /> <a href="#acceptfilter">AcceptFilter</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#acceptpathinfo">AcceptPathInfo</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#accessfilename">AccessFileName</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#adddefaultcharset">AddDefaultCharset</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#allowencodedslashes">AllowEncodedSlashes</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#allowoverride">AllowOverride</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#allowoverridelist">AllowOverrideList</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#cgimapextension">CGIMapExtension</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#cgipassauth">CGIPassAuth</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#cgivar">CGIVar</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#contentdigest">ContentDigest</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#defaultruntimedir">DefaultRuntimeDir</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#defaulttype">DefaultType</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#define">Define</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#directory"><Directory></a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#directorymatch"><DirectoryMatch></a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#documentroot">DocumentRoot</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#else"><Else></a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#elseif"><ElseIf></a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#enablemmap">EnableMMAP</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#enablesendfile">EnableSendfile</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#error">Error</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#errordocument">ErrorDocument</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#errorlog">ErrorLog</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#errorlogformat">ErrorLogFormat</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#extendedstatus">ExtendedStatus</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#fileetag">FileETag</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#files"><Files></a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#filesmatch"><FilesMatch></a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#flushmaxpipelined">FlushMaxPipelined</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#flushmaxthreshold">FlushMaxThreshold</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#forcetype">ForceType</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#gprofdir">GprofDir</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#hostnamelookups">HostnameLookups</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#httpprotocoloptions">HttpProtocolOptions</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#if"><If></a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#ifdefine"><IfDefine></a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#ifdirective"><IfDirective></a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#iffile"><IfFile></a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#ifmodule"><IfModule></a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#ifsection"><IfSection></a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#include">Include</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#includeoptional">IncludeOptional</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#keepalive">KeepAlive</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#keepalivetimeout">KeepAliveTimeout</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#limit"><Limit></a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#limitexcept"><LimitExcept></a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#limitinternalrecursion">LimitInternalRecursion</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestbody">LimitRequestBody</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfields">LimitRequestFields</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestfieldsize">LimitRequestFieldSize</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#limitrequestline">LimitRequestLine</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#limitxmlrequestbody">LimitXMLRequestBody</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#location"><Location></a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#locationmatch"><LocationMatch></a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#loglevel">LogLevel</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#maxrangeoverlaps">MaxRangeOverlaps</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#maxrangereversals">MaxRangeReversals</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#maxranges">MaxRanges</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#mergeslashes">MergeSlashes</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#mergetrailers">MergeTrailers</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#mutex">Mutex</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#namevirtualhost">NameVirtualHost</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#options">Options</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#protocol">Protocol</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#protocols">Protocols</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#protocolshonororder">ProtocolsHonorOrder</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#qualifyredirecturl">QualifyRedirectURL</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#readbuffersize">ReadBufferSize</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#regexdefaultoptions">RegexDefaultOptions</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#registerhttpmethod">RegisterHttpMethod</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#rlimitcpu">RLimitCPU</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#rlimitmem">RLimitMEM</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#rlimitnproc">RLimitNPROC</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#scriptinterpretersource">ScriptInterpreterSource</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#seerequesttail">SeeRequestTail</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#serveradmin">ServerAdmin</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#serveralias">ServerAlias</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#servername">ServerName</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#serverpath">ServerPath</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#serverroot">ServerRoot</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#serversignature">ServerSignature</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#servertokens">ServerTokens</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#sethandler">SetHandler</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#setinputfilter">SetInputFilter</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#setoutputfilter">SetOutputFilter</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#stricthostcheck">StrictHostCheck</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#timeout">TimeOut</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#traceenable">TraceEnable</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#unclist">UNCList</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#undefine">UnDefine</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalname">UseCanonicalName</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#usecanonicalphysicalport">UseCanonicalPhysicalPort</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#virtualhost"><VirtualHost></a></li>
</ul>
<h3>Bugfix checklist</h3><ul class="seealso"><li><a href="https://www.apache.org/dist/httpd/CHANGES_2.4">httpd changelog</a></li><li><a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&list_id=144532&product=Apache%20httpd-2&query_format=specific&order=changeddate%20DESC%2Cpriority%2Cbug_severity&component=core">Known issues</a></li><li><a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&component=core">Report a bug</a></li></ul><h3>参照</h3>
<ul class="seealso">
<li><a href="#comments_section">コメント</a></li></ul></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="AcceptFilter" id="AcceptFilter">AcceptFilter</a> <a name="acceptfilter" id="acceptfilter">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>プロトコルを Listen しているソケットの最適化を設定する</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>AcceptFilter <var>protocol</var> <var>accept_filter</var></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>2.1.5 以降</td></tr>
</table>
<p>Listen しているソケットに対して、OS が固有に持っているプロトコルについての最適化を
有効にするディレクティブです。大前提となる条件は、データが受信されるか
HTTP リクエスト全体がバッファされるかするまで、カーネルがサーバプロセスに
ソケットを送らないようになっている、ということです。現在サポートされているのは、
<a href="http://www.freebsd.org/cgi/man.cgi?query=accept_filter&sektion=9">
FreeBSD の Accept Filter</a> と Linux のプリミティブな
<code>TCP_DEFER_ACCEPT</code> のみです。</p>
<p>FreeBSD のデフォルト値は :</p>
<div class="example"><p><code>
AcceptFilter http httpready <br />
AcceptFilter https dataready
</code></p></div>
<p><code>httpready</code> Accept Filter は HTTP リクエスト全体を、
カーネルレベルでバッファリングします。リクエスト全体を受信し終わると、
その後サーバプロセスにそれを送ります。詳細については <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_http&sektion=9">accf_http(9)</a>
を参照してください。HTTPS のリクエストは暗号化されているので <a href="http://www.freebsd.org/cgi/man.cgi?query=accf_data&sektion=9">accf_data(9)</a>
フィルタのみが使用されます。</p>
<p>Linux でのデフォルト値は :</p>
<div class="example"><p><code>
AcceptFilter http data <br />
AcceptFilter https data
</code></p></div>
<p>Linux の <code>TCP_DEFER_ACCEPT</code> は HTTP リクエストのバッファリングを
サポートしていません。<code>none</code> 以外の値で
<code>TCP_DEFER_ACCEPT</code> が有効になります。詳細については Linux
man ページ <a href="http://homepages.cwi.nl/~aeb/linux/man2html/man7/tcp.7.html">tcp(7)</a>
を参照してください。</p>
<p>引数に <code>none</code> を指定すると、プロトコルに対する全ての Accept
Filter が無効になります。<code>nntp</code> といった、先にサーバにデータを
送る必要のあるプロトコルに有効です :</p>
<div class="example"><p><code>AcceptFilter nntp none</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="AcceptPathInfo" id="AcceptPathInfo">AcceptPathInfo</a> <a name="acceptpathinfo" id="acceptpathinfo">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>後に続くパス名情報を受け付けるリソースの指定</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>AcceptPathInfo On|Off|Default</code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>AcceptPathInfo Default</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Apache 2.0.30 以降で使用可能</td></tr>
</table>
<p>このディレクティブは実際のファイル名 (もしくは存在するディレクトリの
存在しないファイル) の後に続くパス名情報があるリクエストを受け付けるか
拒否するかを制御します。続きのパス名情報はスクリプトには <code>PATH_INFO</code>
環境変数として利用可能になります。</p>
<p>例えば、<code>/test/</code> が、<code>here.html</code> というファイル
一つのみがあるディレクトリを指しているとします。そうすると、
<code>/test/here.html/more</code> と <code>/test/nothere.html/more</code>
へのリクエストは両方とも <code>/more</code> を <code>PATH_INFO</code> とします。</p>
<p><code class="directive">AcceptPathInfo</code> ディレクティブに指定可能な
三つの引数は:</p>
<dl>
<dt><code>Off</code></dt><dd>リクエストは存在するパスにそのまま
マップされる場合にのみ受け付けられます。ですから、上の例の
<code>/test/here.html/more</code> のように、本当のファイル名の
後にパス名情報が続くリクエストには 404 NOT FOUND エラーが返ります。</dd>
<dt><code>On</code></dt><dd>前の方のパスが存在するファイルにマップする場合は
リクエストが受け付けられます。上の例の <code>/test/here.html/more</code>
は <code>/test/here.html</code> が有効なファイルにマップすれば
受け付けられます。</dd>
<dt><code>Default</code></dt><dd>続きのパス名情報の扱いはリクエストの
<a href="../handler.html">ハンドラ</a>で決まります。
普通のファイルのためのコアハンドラのデフォルトは <code>PATH_INFO</code> を拒否します。
<a href="mod_cgi.html">cgi-script</a> や <a href="mod_isapi.html">isapi-handler</a> のようにスクリプトを扱うハンドラは
一般的にデフォルトで <code>PATH_INFO</code> を受け付けます。</dd>
</dl>
<p><code>AcceptPathInfo</code> の主な目的はハンドラの <code>PATH_INFO</code> を
受け付けるか拒否するかの選択を上書きできるようにすることです。
例えば、これは例えば <a href="mod_include.html">INCLUDES</a> のような
<a href="../filter.html">フィルタ</a>を使って <code>PATH_INFO</code> に
基づいてコンテンツを生成しているときに必要になります。
コアハンドラでは通常拒否されるので、そういったスクリプトを動作させるには
次のような設定を使います。</p>
<div class="example"><p><code>
<Files "mypaths.shtml"><br />
<span class="indent">
Options +Includes<br />
SetOutputFilter INCLUDES<br />
AcceptPathInfo On<br />
</span>
</Files>
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="AccessFileName" id="AccessFileName">AccessFileName</a> <a name="accessfilename" id="accessfilename">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>分散設定ファイルの名前</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>AccessFileName <var>filename</var> [<var>filename</var>] ...</code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>AccessFileName .htaccess</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p>リクエストを処理するとき、サーバはディレクトリに
対して分散設定ファイルが<a href="#allowoverride">有効になっていれば</a>、
そのドキュメントへの
パス上にある全てのディレクトリから、ここで指定された名前の一覧の中で
最初に見つかったファイルをそれぞれ設定ファイルとして読み込みます。例えば:</p>
<div class="example"><p><code>
AccessFileName .acl
</code></p></div>
<p>という設定があると、以下のようにして無効にされていない限り、
ドキュメント <code>/usr/local/web/index.html</code>
を返す前に、サーバは <code>/.acl</code>, <code>/usr/.acl</code>,
<code>/usr/local/.acl</code>, <code>/usr/local/web/.acl</code> から
ディレクティブを読み込みます。</p>
<div class="example"><p><code>
<Directory /><br />
<span class="indent">
AllowOverride None<br />
</span>
</Directory>
</code></p></div>
<h3>参照</h3>
<ul>
<li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li>
<li><a href="../configuring.html">設定ファイル</a></li>
<li><a href="../howto/htaccess.html">.htaccess ファイル</a></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="AddDefaultCharset" id="AddDefaultCharset">AddDefaultCharset</a> <a name="adddefaultcharset" id="adddefaultcharset">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>レスポンスのコンテントタイプが <code>text/plain</code> あるいは
<code>text/html</code> の場合に追加するデフォルトの charset パラメータ</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>AddDefaultCharset On|Off|<var>charset</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>AddDefaultCharset Off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p>レスポンスのコンテントタイプが <code>text/plain</code>
あるいは <code>text/html</code>
の場合に限りますが、レスポンスに追加するメディアタイプの文字セットパラメータ
(文字エンコーディングの名前) のデフォルト値を、このディレクティブで指定します。
これはレスポンス <span class="transnote">(<em>訳注:</em> レスポンスの HTML)</span> 内で <code>META</code>
要素で指定された、どのような文字セットも無効にしますが、
最終的な挙動はユーザのクライアント側の設定で決まります。
この機能は <code>AddDefaultCharset Off</code> という設定で無効になります。
<code>AddDefaultCharset On</code> にすれば、
Apache 内部のデフォルト文字セット <code>iso-8859-1</code> に設定されます。
その他 <var>charset</var> に指定できる値であれば、どんな値でも使えます。
指定する値は、MIME メディアタイプとして使われる
<a href="http://www.iana.org/assignments/character-sets">IANA
に登録されている文字セット名</a>のうちの一つにすべきです。
例えば:</p>
<div class="example"><p><code>
AddDefaultCharset utf-8
</code></p></div>
<p><code class="directive">AddDefaultCharset</code> を使うときは、全てのテキストリソースが
指定する文字エンコードになっていると分かっていて、かつ、
リソースの個々に文字セットを指定するのが大変な場合のみです。
例を挙げると、レガシーな CGI スクリプトなどの、動的に生成される
コンテンツを含むリソースに文字セットパラメータを追加する場合で、
ユーザの入力データが出力に入り、クロスサイトスクリプティングが
引き起こされうる場合です。デフォルト文字セットをセットしたとしても、
ブラウザの "文字エンコードの自動選択" 機能が有効になっているユーザを
守ることにはならないので、もちろんより良い解決策は単にスクリプトを修正
(あるいは削除) することです。</p>
<h3>参照</h3>
<ul>
<li><code class="directive"><a href="../mod/mod_mime.html#addcharset">AddCharset</a></code></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="AllowEncodedSlashes" id="AllowEncodedSlashes">AllowEncodedSlashes</a> <a name="allowencodedslashes" id="allowencodedslashes">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>URL 中の符号化されたパス分離文字が先に伝えられるのを許可するかどうかを
決定する</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>AllowEncodedSlashes On|Off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>AllowEncodedSlashes Off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Apache 2.0.46 以降で使用可能</td></tr>
</table>
<p><code class="directive">AllowEncodedSlashes</code> ディレクティブは符号化された
パス分離文字 (<code>/</code> は <code>%2F</code>、さらにシステムによっては
<code>\</code> に対応する <code>%5C</code>) が存在する URL の使用を
許可するかどうかを決定します。通常はそのような URL は 404 (Not found) エラー
で拒否されます。</p>
<p><code class="directive">AllowEncodedSlashes</code> <code>On</code> による
パス分離文字の使用は、<code>PATH_INFO</code> と合わせて
使うときに一番役に立ちます。</p>
<div class="note"><h3>注</h3>
<p>符号化されたスラッシュを許可することは、<em>復号</em>をすることを
意味<em>しません</em>。<code>%2F</code> や (関係するシステムでの)
<code>%5C</code> は、他の部分が復号された URL の中でもそのままの形式で
残されます。</p>
</div>
<h3>参照</h3>
<ul>
<li><code class="directive"><a href="#acceptpathinfo">AcceptPathInfo</a></code></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="AllowOverride" id="AllowOverride">AllowOverride</a> <a name="allowoverride" id="allowoverride">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td><code>.htaccess</code> で許可されるディレクティブの種類</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>AllowOverride All|None|<var>directive-type</var>
[<var>directive-type</var>] ...</code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>AllowOverride All</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>ディレクトリ</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p>サーバが (<code class="directive"><a href="#accessfilename">AccessFileName</a></code> によって指定された)
<code>.htaccess</code> ファイルを見つけた時、そのファイルの中で
宣言されたどのディレクティブがより前に定義された設定ディレクティブを
上書きできるかを知る必要があります。</p>
<div class="note"><h3><Directory> セクションでのみ使用可能</h3>
<code class="directive">AllowOverride</code> は正規表現無しの<code class="directive"><a href="#directory"><Directory></a></code>
セクションでのみ有効で、<code class="directive"><a href="#location"><Location></a></code> や <code class="directive"><a href="#directorymatch"><DirectoryMatch></a></code>
や <code class="directive"><a href="#files"><Files></a></code> セクションでは無効です。
</div>
<p>このディレクティブを <code>None</code> に設定すると、<a href="#accessfilename">.htaccess</a> ファイルは完全に
無視されます。
この場合、サーバはファイルシステムの <code>.htaccess</code> ファイルを読むことを
試みさえしません。</p>
<p>このディレクティブが <code>All</code> に設定されている時には、
<code>.htaccess</code> という <a href="directive-dict.html#Context">コンテキスト</a> を持つ
全てのディレクティブが利用できます。</p>
<p><var>directive-type</var> には、以下のディレクティブ群の
キーワードのどれかを指定します。</p>
<dl>
<dt>AuthConfig</dt>
<dd>
認証に関するディレクティブの使用を許可する (<code class="directive"><a href="../mod/mod_authn_dbm.html#authdbmgroupfile">AuthDBMGroupFile</a></code>,
<code class="directive"><a href="../mod/mod_authn_dbm.html#authdbmuserfile">AuthDBMUserFile</a></code>,
<code class="directive"><a href="../mod/mod_authz_groupfile.html#authgroupfile">AuthGroupFile</a></code>,
<code class="directive"><a href="../mod/mod_authn_core.html#authname">AuthName</a></code>,
<code class="directive"><a href="../mod/mod_authn_core.html#authtype">AuthType</a></code>, <code class="directive"><a href="../mod/mod_authn_file.html#authuserfile">AuthUserFile</a></code>, <code class="directive"><a href="../mod/mod_authz_core.html#require">Require</a></code> <em>など</em>)。</dd>
<dt>FileInfo</dt>
<dd>
ドキュメントタイプを制御するためのディレクティブの使用を許可する (<code class="directive"><a href="#defaulttype">DefaultType</a></code>, <code class="directive"><a href="#errordocument">ErrorDocument</a></code>, <code class="directive"><a href="#forcetype">ForceType</a></code>, <code class="directive"><a href="../mod/mod_negotiation.html#languagepriority">LanguagePriority</a></code>,
<code class="directive"><a href="#sethandler">SetHandler</a></code>, <code class="directive"><a href="#setinputfilter">SetInputFilter</a></code>, <code class="directive"><a href="#setoutputfilter">SetOutputFilter</a></code>,
<code class="module"><a href="../mod/mod_mime.html">mod_mime</a></code> の Add* と Remove*
ディレクティブ<em>など</em>),
ドキュメントのメタデータ (<code class="directive"><a href="../mod/mod_headers.html#header">Header</a></code>, <code class="directive"><a href="../mod/mod_headers.html#requestheader">RequestHeader</a></code>, <code class="directive"><a href="../mod/mod_setenvif.html#setenvif">SetEnvIf</a></code>, <code class="directive"><a href="../mod/mod_setenvif.html#setenvifnocase">SetEnvIfNoCase</a></code>, <code class="directive"><a href="../mod/mod_setenvif.html#browsermatch">BrowserMatch</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookieexpires">CookieExpires</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookiedomain">CookieDomain</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookiestyle">CookieStyle</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookietracking">CookieTracking</a></code>, <code class="directive"><a href="../mod/mod_usertrack.html#cookiename">CookieName</a></code>),
<code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> のディレクティブ <code class="directive"><a href="../mod/mod_rewrite.html#rewriteengine">RewriteEngine</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewriteoptions">RewriteOptions</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewritebase">RewriteBase</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewritecond">RewriteCond</a></code>, <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code>) と
<code class="module"><a href="../mod/mod_actions.html">mod_actions</a></code> の
<code class="directive"><a href="../mod/mod_actions.html#action">Action</a></code>
ディレクティブ。
</dd>
<dt>Indexes</dt>
<dd>
ディレクトリインデックスを制御するためのディレクティブの使用を許可する
(<code class="directive"><a href="../mod/mod_autoindex.html#adddescription">AddDescription</a></code>,
<code class="directive"><a href="../mod/mod_autoindex.html#addicon">AddIcon</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#addiconbyencoding">AddIconByEncoding</a></code>,
<code class="directive"><a href="../mod/mod_autoindex.html#addiconbytype">AddIconByType</a></code>,
<code class="directive"><a href="../mod/mod_autoindex.html#defaulticon">DefaultIcon</a></code>, <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#fancyindexing">FancyIndexing</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#headername">HeaderName</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#indexignore">IndexIgnore</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#indexoptions">IndexOptions</a></code>, <code class="directive"><a href="../mod/mod_autoindex.html#readmename">ReadmeName</a></code>
<em>など</em>)。</dd>
<dt>Limit</dt>
<dd>
ホストへのアクセス制御を行うためのディレクティブの使用を許可する (<code class="directive"><a href="../mod/mod_authz_host.html#allow">Allow</a></code>, <code class="directive"><a href="../mod/mod_authz_host.html#deny">Deny</a></code>, <code class="directive"><a href="../mod/mod_authz_host.html#order">Order</a></code>).</dd>
<dt>Options[=<var>Option</var>,...]</dt>
<dd>
特定のディレクトリにおける機能を指定するためのディレクティブの使用を許可する
(<code class="directive"><a href="#options">Options</a></code> と
<code class="directive"><a href="../mod/mod_include.html#xbithack">XBitHack</a></code>)。
<code class="directive"><a href="#options">Options</a></code> で設定するオプション
を、(空白を含めない) コンマ区切りのリストにして等号の後に続けることで
設定できます。</dd>
</dl>
<p>例:</p>
<div class="example"><p><code>
AllowOverride AuthConfig Indexes
</code></p></div>
<p>上の例では <code>AuthConfig</code> と <code>Indexes</code> のどちらにも
属さないディレクティブはすべて内部サーバエラーを引き起こします。</p>
<h3>参照</h3>
<ul>
<li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li>
<li><a href="../configuring.html">設定ファイル</a></li>
<li><a href="../howto/htaccess.html">.htaccess ファイル</a></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="AllowOverrideList" id="AllowOverrideList">AllowOverrideList</a> <a name="allowoverridelist" id="allowoverridelist">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Individual directives that are allowed in
<code>.htaccess</code> files</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>AllowOverrideList None|<var>directive</var>
[<var>directive-type</var>] ...</code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>AllowOverrideList None</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>ディレクトリ</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table><p>このディレクティブの解説文書は
まだ翻訳されていません。英語版をご覧ください。
</p><h3>参照</h3>
<ul>
<li><code class="directive"><a href="#accessfilename">AccessFileName</a></code></li>
<li><code class="directive"><a href="#allowoverride">AllowOverride</a></code></li>
<li><a href="../configuring.html">Configuration Files</a></li>
<li><a href="../howto/htaccess.html">.htaccess Files</a></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="CGIMapExtension" id="CGIMapExtension">CGIMapExtension</a> <a name="cgimapextension" id="cgimapextension">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>CGI スクリプトのインタープリタの位置を調べるための手法</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>CGIMapExtension <var>cgi-path</var> <var>.extension</var></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>NetWare のみ</td></tr>
</table>
<p>このディレクティブは Apache が CGI スクリプトを実行するための
インタープリタを探す方法を制御します。
例えば、<code>CGIMapExtension sys:\foo.nlm .foo</code> と設定すると
<code>.foo</code> という拡張子のすべての CGI スクリプトは FOO インタープリタに
渡されます。</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="CGIPassAuth" id="CGIPassAuth">CGIPassAuth</a> <a name="cgipassauth" id="cgipassauth">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Enables passing HTTP authorization headers to scripts as CGI
variables</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>CGIPassAuth On|Off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>CGIPassAuth Off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>AuthConfig</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available in Apache HTTP Server 2.4.13 and later</td></tr>
</table><p>このディレクティブの解説文書は
まだ翻訳されていません。英語版をご覧ください。
</p></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="CGIVar" id="CGIVar">CGIVar</a> <a name="cgivar" id="cgivar">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Controls how some CGI variables are set</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>CGIVar <var>variable</var> <var>rule</var></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available in Apache HTTP Server 2.4.21 and later</td></tr>
</table><p>このディレクティブの解説文書は
まだ翻訳されていません。英語版をご覧ください。
</p></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ContentDigest" id="ContentDigest">ContentDigest</a> <a name="contentdigest" id="contentdigest">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td><code>Content-MD5</code> HTTP 応答ヘッダの生成を有効にする</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ContentDigest On|Off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>ContentDigest Off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>Options</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p>このディレクティブは、RFC1864 及び RFC2616 において定義されている
<code>Content-MD5</code> ヘッダーの生成を有効にします。</p>
<p>MD5 は、任意長のデータの「メッセージダイジェスト」(「指紋」
と表現されることもある) を計算するアルゴリズムで、
データの変更があった場合には非常に高い信頼度でメッセージダイジェストに変更が
反映されます。</p>
<p><code>Content-MD5</code> ヘッダは、エンドツーエンドで
エンティティボディーに含まれるメッセージの完全性チェック
(Message Integrity Check - MIC)を提供します。
このヘッダを調べることで、プロキシやクライアントは、
途中経路におけるエンティティボディの予期せぬ変更などを
検出することができます。ヘッダの例:</p>
<div class="example"><p><code>
Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA==
</code></p></div>
<p>リクエスト毎にメッセージダイジェストを計算する (値はキャッシュされません)
ことから、
サーバパフォーマンスが低下することについて注意してください。</p>
<p><code>Content-MD5</code>は、<code class="module"><a href="../mod/core.html">core</a></code> 機能により処理された
ドキュメントを送るときのみ有効であり、
SSI ドキュメントや CGI スクリプトの出力、バイトレンジを指定した
応答の場合にはこのヘッダは付与されません。
</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="DefaultRuntimeDir" id="DefaultRuntimeDir">DefaultRuntimeDir</a> <a name="defaultruntimedir" id="defaultruntimedir">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Base directory for the server run-time files</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>DefaultRuntimeDir <var>directory-path</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>DefaultRuntimeDir DEFAULT_REL_RUNTIMEDIR (logs/)</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available in Apache 2.4.2 and later</td></tr>
</table><p>このディレクティブの解説文書は
まだ翻訳されていません。英語版をご覧ください。
</p><h3>参照</h3>
<ul>
<li><a href="../misc/security_tips.html#serverroot">the
security tips</a> for information on how to properly set
permissions on the <code class="directive">ServerRoot</code></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="DefaultType" id="DefaultType">DefaultType</a> <a name="defaulttype" id="defaulttype">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>サーバがコンテントタイプを決定できないときに
送られる MIME コンテントタイプ</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>DefaultType <var>MIME-type|none</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>DefaultType text/plain</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>引数 <code>none</code> は Apache 2.2.7 以降で利用可能</td></tr>
</table>
<p>サーバは、<a class="glossarylink" href="../glossary.html#mime-type" title="用語集を参照">MIME タイプ</a>
のマップからは決定できないドキュメントの送信を要求されることがあります。</p>
<p>サーバは、ドキュメントのコンテントタイプをクライアントに通知するべきです。
サーバで通常の方法ではこれが判定できない場合は、
<code>DefaultType</code> で指定されたタイプを利用します。
例:</p>
<div class="example"><p><code>
DefaultType image/gif
</code></p></div>
<p>これは <code>.gif</code> という拡張子がファイル名に含まれていない
多くの GIF 画像が含まれているディレクトリに適しているでしょう。</p>
<p>サーバでも管理者でも判定することができない (例えばプロクシの) 場合、
誤った情報を与えるよりは MIME タイプの指定がない状態が望ましいことも
あります。この場合は次のようにします :</p>
<div class="example"><p><code>
DefaultType None
</code></p></div>
<p><code>DefaultType None</code> は httpd-2.2.7
以降でのみ利用できます。</p>
<p><code class="directive"><a href="#forcetype">ForceType</a></code> ディレクティブと
違って、このディレクティブはデフォルトの MIME タイプを提供するだけで
あることに注意してください。ファイル名の拡張子を含め、
メディアタイプを決定できる他の MIME タイプの定義があれば
このデフォルトは上書きされます。</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="Define" id="Define">Define</a> <a name="define" id="define">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>変数の存在を宣言する</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>Define <var>parameter-name</var></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p><code class="program"><a href="../programs/httpd.html">httpd</a></code> の <code>-D</code>
引数と同じものです。</p>
<p>このディレクティブを使うと、スタートアップスクリプトに
記載されている <code>-D</code> 引数を書き換える必要なく、
<code class="directive"><a href="#ifdefine"><IfDefine></a></code>
セクションを切り替えることができます。</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="Directory" id="Directory"><Directory></a> <a name="directory" id="directory">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>指定のファイルシステムのディレクトリとサブディレクトリとのみに
適用されるディレクティブを囲む</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><Directory <var>directory-path</var>>
... </Directory></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p>指定されたディレクトリとそのサブディレクトリにのみ
ディレクティブを適用させるためには、
<code class="directive"><Directory></code> と
<code></Directory></code> を対として、ディレクティブ群を囲います。
その中には、ディレクトリコンテキストで許可された全てのディレクティブを
利用できます。
<var>directive-path</var> は、フルパスもしくは Unix のシェル形式の
ワイルドカードを指定します。
<code>?</code> は任意の 1 文字、<code>*</code> は任意の文字列にマッチします。
シェルにおける指定同様、文字の範囲を <code>[]</code> で指定できます。
ワイルドカードは `/' 文字にはマッチしませんので、
<code>/home/user/public_html</code> には
<code><Directory /*/public_html></code> はマッチしませんが、
<code><Directory /home/*/public_html></code> はマッチします。
例:</p>
<div class="example"><p><code>
<Directory /usr/local/httpd/htdocs><br />
<span class="indent">
Options Indexes FollowSymLinks<br />
</span>
</Directory>
</code></p></div>
<div class="note">
<p><var>directory-path</var> 引数には注意してください: その引数は
Apache がファイルをアクセスするために使うファイルシステムのパスに
そのままマッチする必要があります。ある <code><Directory></code> に
適用されるディレクティブは、別のシンボリックリンクをたどったりして
同じディレクトリを違うパスでアクセスした場合には適用されません。</p>
</div>
<p><code>~</code> という文字を
付加することで<a class="glossarylink" href="../glossary.html#regex" title="用語集を参照">正規表現</a>を利用することもできます。
例えば:</p>
<div class="example"><p><code>
<Directory ~ "^/www/.*/[0-9]{3}">
</code></p></div>
<p>といった指定の場合、<code>/www/</code> 以下にある数字
3 文字のディレクトリにマッチします。</p>
<p>もし複数の (正規表現以外の) <code class="directive"><Directory></code>セクションが
ドキュメントを含むディレクトリ (やその上位ディレクトリのどれか) とマッチしたならば、
<a href="#accessfilename">.htaccess</a> ファイルのディレクティブも読み込みつつ、
短いパスから順に適用されます。
例えば、</p>
<div class="example"><p><code>
<Directory /><br />
<span class="indent">
AllowOverride None<br />
</span>
</Directory><br />
<br />
<Directory /home/><br />
<span class="indent">
AllowOverride FileInfo<br />
</span>
</Directory>
</code></p></div>
<p>と設定し、ドキュメント <code>/home/web/dir/doc.html</code> への
アクセスがあった場合には以下のように動作します:</p>
<ul>
<li><code>AllowOverride None</code> が適用される。
(<code>.htaccess</code> ファイルは無効になる)</li>
<li><code>AllowOverride FileInfo</code> が適用される
(<code>/home</code> ディレクトリに対して)。</li>
<li><code>/home/.htaccess</code>, <code>/home/web/.htaccess</code>,
<code>/home/web/dir/.htaccess</code> の順にそれらのファイル中の
FileInfo ディレクティブが適用される。</li>
</ul>
<p>正規表現は、通常のセクションがすべて適用されるまで
考慮されません。
その後、全ての正規表現が設定ファイルに現れた順で試されます。
例えば、以下のような場合に</p>
<div class="example"><p><code>
<Directory ~ abc$><br />
<span class="indent">
# ... directives here ...<br />
</span>
</Directory>
</code></p></div>
<p>正規表現のセクションはすべての通常の <code class="directive"><Directory></code> と
<code>.htaccess</code> の適用が終わるまで考慮されません。
その後で、正規表現は <code>/home/abc/public_html/abc</code> にマッチし、
対応する <code class="directive"><Directory></code> が適用されます。</p>
<p><strong>Apache のデフォルトでは <code><Directory /></code> へのアクセスは
<code>Allow from All</code> になっていることに注意してください。
これは、URL からマップされたどのファイルでも Apache は送るということです。
これは以下のようにして変更することが推奨されています。</strong></p>
<div class="example"><p><code>
<Directory /><br />
<span class="indent">
Order Deny,Allow<br />
Deny from All<br />
</span>
</Directory>
</code></p></div>
<p><strong>そしてアクセスを<em>可能にしたい</em>ディレクトリに対して
個別に設定すればよいでしょう。
このあたりについては、<a href="../misc/security_tips.html">セキュリティに関するコツ</a>を
参照してください。</strong></p>
<p>ディレクトリセクションは <code>httpd.conf</code> ファイルに書きます。
<code class="directive"><Directory></code>
ディレクティブは入れ子にすることができず、
<code class="directive"><a href="#limit"><Limit></a></code> や <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> セクションの中にも
記述できません。</p>
<h3>参照</h3>
<ul>
<li>リクエストを受けた際にこれらの異なるセクションが
組み合わされる方法については <a href="../sections.html">
<Directory>, <Location>, <Files> セクションの動作法</a></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="DirectoryMatch" id="DirectoryMatch"><DirectoryMatch></a> <a name="directorymatch" id="directorymatch">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>正規表現にマッチするファイルシステムのディレクトリと
サブディレクトリとのみに適用されるディレクティブを囲む</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><DirectoryMatch <var>regex</var>>
... </DirectoryMatch></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p><code class="directive"><a href="#directory"><Directory></a></code>
ディレクティブと同様に、<code class="directive"><DirectoryMatch></code>
と <code></DirectoryMatch></code> は指定されたディレクトリと
そのサブディレクトリにのみ適用されるディレクティブ群を囲います。
しかし、このディレクティブは引数として<a class="glossarylink" href="../glossary.html#regex" title="用語集を参照">正規表現</a>をとります。例えば:</p>
<div class="example"><p><code>
<DirectoryMatch "^/www/(.+/)?[0-9]{3}">
</code></p></div>
<p>は <code>/www/</code> 以下にある数字 3 文字のディレクトリにマッチします。</p>
<h3>参照</h3>
<ul>
<li>通常の <code class="directive"><Directory></code> と正規表現の指定が
適用される順番については <code class="directive"><a href="#directory"><Directory></a></code></li>
<li>リクエストを受けた際にこれらの異なるセクションが
組み合わされる方法については <a href="../sections.html">
<Directory>, <Location>, <Files> セクションの動作法</a></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="DocumentRoot" id="DocumentRoot">DocumentRoot</a> <a name="documentroot" id="documentroot">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>ウェブから見えるメインのドキュメントツリーになる
ディレクトリ</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>DocumentRoot <var>directory-path</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>DocumentRoot /usr/local/apache/htdocs</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p>このディレクティブは、<code class="program"><a href="../programs/httpd.html">httpd</a></code>
がファイルを提供するディレクトリを設定します。
<code class="directive"><a href="../mod/mod_alias.html#alias">Alias</a></code> のようなディレクティブにマッチしない場合には、
ドキュメントの (訳注:ファイルシステム上の) パスを生成するために、
リクエストされた URL のパス部分をドキュメントルートに付与します。
例:</p>
<div class="example"><p><code>
DocumentRoot /usr/web
</code></p></div>
<p>この場合、
<code>http://www.my.host.com/index.html</code> へのアクセスがあれば
<code>/usr/web/index.html</code> が返されます。
<var>directory-path</var> が絶対パスでない場合は、
<code class="directive"><a href="#serverroot">ServerRoot</a></code>
からの相対パスとみなされます。</p>
<p><code class="directive">DocumentRoot</code> は最後のスラッシュ無しで
指定する必要があります。</p>
<h3>参照</h3>
<ul>
<li><a href="../urlmapping.html#documentroot">URL をファイルシステムの位置に
マップする</a></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="Else" id="Else"><Else></a> <a name="else" id="else">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Contains directives that apply only if the condition of a
previous <code class="directive"><a href="#if"><If></a></code> or
<code class="directive"><a href="#elseif"><ElseIf></a></code> section is not
satisfied by a request at runtime</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><Else> ... </Else></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Nested conditions are evaluated in 2.4.26 and later</td></tr>
</table><p>このディレクティブの解説文書は
まだ翻訳されていません。英語版をご覧ください。
</p><h3>参照</h3>
<ul>
<li><code class="directive"><a href="#if"><If></a></code></li>
<li><code class="directive"><a href="#elseif"><ElseIf></a></code></li>
<li><a href="../sections.html">How <Directory>, <Location>,
<Files> sections work</a> for an explanation of how these
different sections are combined when a request is received.
<code class="directive"><If></code>,
<code class="directive"><ElseIf></code>, and
<code class="directive"><Else></code> are applied last.</li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ElseIf" id="ElseIf"><ElseIf></a> <a name="elseif" id="elseif">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Contains directives that apply only if a condition is satisfied
by a request at runtime while the condition of a previous
<code class="directive"><a href="#if"><If></a></code> or
<code class="directive"><ElseIf></code> section is not
satisfied</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><ElseIf <var>expression</var>> ... </ElseIf></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Nested conditions are evaluated in 2.4.26 and later</td></tr>
</table><p>このディレクティブの解説文書は
まだ翻訳されていません。英語版をご覧ください。
</p><h3>参照</h3>
<ul>
<li><a href="../expr.html">Expressions in Apache HTTP Server</a>,
for a complete reference and more examples.</li>
<li><code class="directive"><a href="#if"><If></a></code></li>
<li><code class="directive"><a href="#else"><Else></a></code></li>
<li><a href="../sections.html">How <Directory>, <Location>,
<Files> sections work</a> for an explanation of how these
different sections are combined when a request is received.
<code class="directive"><If></code>,
<code class="directive"><ElseIf></code>, and
<code class="directive"><Else></code> are applied last.</li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="EnableMMAP" id="EnableMMAP">EnableMMAP</a> <a name="enablemmap" id="enablemmap">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>配送中にファイルを読み込むためにメモリマッピングを
使うかどうか</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>EnableMMAP On|Off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>EnableMMAP On</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p>このディレクティブは配送中にファイルの内容を読み込む必要があるときに
<code class="program"><a href="../programs/httpd.html">httpd</a></code> がメモリマッピングを使うかどうかを制御します。
デフォルトでは、
例えば、<code class="module"><a href="../mod/mod_include.html">mod_include</a></code> を使って SSI ファイルを配送
するときのように、ファイルの途中のデータをアクセスする必要があるときには
Apache は OS がサポートしていればファイルをメモリにマップします。</p>
<p>
このメモリマップは性能の向上をもたらすことがあります。
しかし、環境によっては運用上の問題を防ぐためにメモリマッピングを
使用しないようにした方が良い場合もあります:</p>
<ul>
<li>マルチプロセッサシステムの中にはメモリマッピングをすると
<code class="program"><a href="../programs/httpd.html">httpd</a></code> の性能が落ちるものがあります。</li>
<li>NFS マウントされた <code class="directive"><a href="#documentroot">DocumentRoot</a></code>
では、<code class="program"><a href="../programs/httpd.html">httpd</a></code> がメモリマップしている間にファイルが削除されたり
短くなったりしたときに起こるセグメンテーションフォールトのために
<code class="program"><a href="../programs/httpd.html">httpd</a></code> がクラッシュする可能性があります。</li>
</ul>
<p>これらの問題に当てはまるサーバの設定の場合は、以下のようにして
ファイルの配送時のメモリマッピングを使用不可にしてください:</p>
<div class="example"><p><code>
EnableMMAP Off
</code></p></div>
<p>NFS マウントされたファイルには、問題のあるファイルにのみ明示的に
この機能を使用不可にします:</p>
<div class="example"><p><code>
<Directory "/path-to-nfs-files">
<span class="indent">
EnableMMAP Off
</span>
</Directory>
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="EnableSendfile" id="EnableSendfile">EnableSendfile</a> <a name="enablesendfile" id="enablesendfile">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>ファイルのクライアントへの配送時にカーネルの sendfile サポートを
使うかどうか</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>EnableSendfile On|Off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>EnableSendfile On</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>バージョン 2.0.44 以降で使用可能</td></tr>
</table>
<p>このディレクティブはクライアントにファイルの内容を送るときに
<code class="program"><a href="../programs/httpd.html">httpd</a></code> がカーネルの
sendfile サポートを使うかどうかを制御します。デフォルトでは、
例えば静的なファイルの配送のように、リクエストの処理にファイルの
途中のデータのアクセスを必要としないときには、Apache は OS が
サポートしていればファイルを読み込むことなく sendfile を使って
ファイルの内容を送ります。</p>
<p>sendfile は read と send を別々に行なうことと、バッファの割り当てを
回避します。しかし、プラットフォームやファイルシステムの中には
運用上の問題を避けるためにこの機能を使用不可にした方が良い場合があります:</p>
<ul>
<li>プラットフォームの中にはビルドシステムが検知できなかった、壊れた
sendfile のサポートが存在するものがあります。これは特に
バイナリが別のマシンでビルドされ、壊れた sendfile のあるマシンに
移動したときに起こります。</li>
<li>Linux では、sendfile を用いると、
IPv6 使用時に存在する特定ネットワークカードの TCP-checksum
オフロードのバグを踏んでしまいます。</li>
<li>Itanium 上の Linux では、sendfile では 2GB 以上の
ファイルを扱うことができません。</li>
<li>ネットワークマウントされた <code class="directive"><a href="#documentroot">DocumentRoot</a></code>
(例えば NFS や SMB)
では、カーネルは自身のキャッシュを使ってネットワークからのファイルを
送ることができないことがあります。</li>
</ul>
<p>これらの問題に当てはまるサーバの設定の場合は、以下のようにして
この機能を使用不可にしてください:</p>
<div class="example"><p><code>
EnableSendfile Off
</code></p></div>
<p>NFS や SMB マウントされたファイルには、問題のあるファイルにのみ明示的に
この機能を使用不可にします:</p>
<div class="example"><p><code>
<Directory "/path-to-nfs-files">
<span class="indent">
EnableSendfile Off
</span>
</Directory>
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="Error" id="Error">Error</a> <a name="error" id="error">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Abort configuration parsing with a custom error message</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>Error <var>message</var></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>2.3.9 and later</td></tr>
</table><p>このディレクティブの解説文書は
まだ翻訳されていません。英語版をご覧ください。
</p></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ErrorDocument" id="ErrorDocument">ErrorDocument</a> <a name="errordocument" id="errordocument">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>エラーが発生したときにサーバがクライアントに送るもの</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ErrorDocument <var>error-code document</var></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p>問題やエラーが発生したときの動作として、
Apache には以下の四つのうち一つの動作を設定することができます。</p>
<ol>
<li>Apache 標準の簡単なエラーメッセージを表示</li>
<li>自分で指定したメッセージを表示</li>
<li>問題やエラーの処理をする為に、自サーバ内の
<var>URL-path</var> へリダイレクト</li>
<li>問題やエラーの処理をする為に、外部の <var>URL</var> へリダイレクト</li>
</ol>
<p>最初のものがデフォルトの動作で、2 番目から 4 番目は、
<code class="directive">ErrorDocument</code>ディレクティブにより、
HTTP のレスポンスコードと、メッセージか URL を指定することで設定します。
Apache が問題もしくはエラーに関する追加情報を提供することがあります。</p>
<p>URL の場合は、スラッシュで始まる (/) ローカルの web-path (
<code class="directive"><a href="#documentroot">DocumentRoot</a></code> からの相対パス
) か、クライアントが解決できる完全な URL を指定します。
もしくは、ブラウザに表示されるメッセージを指定できます。
例:</p>
<div class="example"><p><code>
ErrorDocument 500 http://foo.example.com/cgi-bin/tester<br />
ErrorDocument 404 /cgi-bin/bad_urls.pl<br />
ErrorDocument 401 /subscription_info.html<br />
ErrorDocument 403 "Sorry can't allow you access today"
</code></p></div>
<p>加えて、特別な値 <code>default</code> を使って Apache に
ハードコードされている簡単なメッセージを指定することができます。
通常は必要ではありませんが、<code>default</code> を使うと
既存の <code class="directive">ErrorDocument</code> ディレクティブの設定を
継承するところで、Apache のハードコードされた簡単なメッセージに
戻すことができます。</p>
<div class="example"><p><code>
ErrorDocument 404 /cgi-bin/bad_urls.pl<br /><br />
<Directory /web/docs><br />
<span class="indent">
ErrorDocument 404 default<br />
</span>
</Directory>
</code></p></div>
<p>リモート URL (例えば、頭に <code>http</code> と付与した方法) を
<code class="directive">ErrorDocument</code> に指定するとき、
たとえ文書が同じサーバにあろうとも、ドキュメントがどこにあるかを通知するために、
Apache はリダイレクトをクライアントに送出するということに、注意してください。
これにはいろいろと関連して起こる問題があります。
中でも最も重要なのは、クライアントは元々のエラーステータスコードを受け取らず、
代わりにリダイレクトのステータスコードを受け取るということです。
これにより、ステータスコードを使って URL が有効であるかどうかを決定しようとする
ウェブロボットやその他クライアントを、混乱させるかもしれません。
さらに、<code>ErrorDocument 401</code> にリモートの URL を指定すると、
クライアントは 401 というステータスコードを受け取らないため、
パスワードをユーザーに入力要求しなければならないことがわかりません。
従って、<strong><code>ErrorDocument 401</code> というディレクティブを使う場合は、
必ずローカルな文書を参照しなければなりません。</strong></p>
<p>Microsoft Internet Explorer (MSIE) はデフォルトではサーバが生成したエラーメッセージが
「小さすぎる」ときには無視をして自分自身の「やさしい」エラーメッセージで
置換します。サイズのしきい値はエラーの種類によって異なりますが、
一般的にはエラーの文書を 512 バイトよりも大きくすると、MSIE は
サーバが生成したエラーを隠さずに表示します。詳しい情報は Microsoft
Knowledge Base の記事 <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807">Q294807</a>
にあります。</p>
<p>ほとんどのエラーメッセージを上書きすることができますが、特定の状況下では
<code class="directive"><a href="#errordocument">ErrorDocument</a></code> の設定にかかわらず
内蔵のメッセージが使われます。
特に、不正な形式のリクエストが検出された場合、通常のリクエスト処理は
即座に中止され、内蔵のエラーメッセージが返されます。
この処置は不正なリクエストによって引き起こされる、セキュリティ問題から
守るために必要な措置です。</p>
<p>2.0 より前のバージョンでは、対になっていない二重引用符を
先頭に付けることによりメッセージであることを指定していました。</p>
<h3>参照</h3>
<ul>
<li><a href="../custom-error.html">カスタマイズ可能な
エラー応答のドキュメンテーション</a></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ErrorLog" id="ErrorLog">ErrorLog</a> <a name="errorlog" id="errorlog">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>サーバがエラーをログ収集する場所</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code> ErrorLog <var>file-path</var>|syslog[:<var>facility</var>]</code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>ErrorLog logs/error_log (Unix) ErrorLog logs/error.log (Windows and OS/2)</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p><code class="directive">ErrorLog</code> ディレクティブは、
サーバに生じたさまざまなエラーを
記録する為のファイルの名前を設定します。
<var>file-path</var> が絶対パスでないときは、<code class="directive"><a href="#serverroot">ServerRoot</a></code> からの相対パスとみなされます。</p>
<div class="example"><h3>例</h3><p><code>
ErrorLog /var/log/httpd/error_log
</code></p></div>
<p><var>file-path</var> がパイプ (|) から始まる場合は、
エラーログを処理するために実行されるコマンドが
指定されていると解釈されます。</p>
<div class="example"><h3>例</h3><p><code>
ErrorLog "|/usr/local/bin/httpd_errors"
</code></p></div>
<p>ファイル名の変わりに <code>syslog</code> と指定することによって、
システムがサポートしていれば syslogd(8) を利用したロギングが有効になります。
デフォルトでは、<code>local7</code> ファシリティとなりますが、
<code>syslog:<var>facility</var></code> といった形で記述することにより、
通常 syslog(1) のドキュメントで説明されているファシリティの一つを使うように
することができます。</p>
<div class="example"><h3>例</h3><p><code>
ErrorLog syslog:user
</code></p></div>
<p>セキュリティ:
ログファイルを格納するディレクトリが、サーバを起動したユーザ以外の
ユーザによって書き込める場合にセキュリティが破られる可能性があることに
関する詳細は <a href="../misc/security_tips.html#serverroot">セキュリティに関するコツ</a> を
参照してください。</p>
<div class="warning"><h3>注</h3>
<p>Unix 以外のプラットフォームでファイルのパスを入力するときは、
プラットフォームがバックスラッシュの使用を許していたとしても、
確実にスラッシュのみが使用されるように注意してください。一般的には、
設定ファイル全般でスラッシュのみを使う方が良いでしょう。</p>
</div>
<h3>参照</h3>
<ul>
<li><code class="directive"><a href="#loglevel">LogLevel</a></code></li>
<li><a href="../logs.html">Apache ログファイル</a></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ErrorLogFormat" id="ErrorLogFormat">ErrorLogFormat</a> <a name="errorlogformat" id="errorlogformat">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Format specification for error log entries</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code> ErrorLogFormat [connection|request] <var>format</var></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table><p>このディレクティブの解説文書は
まだ翻訳されていません。英語版をご覧ください。
</p><h3>参照</h3>
<ul>
<li><code class="directive"><a href="#errorlog">ErrorLog</a></code></li>
<li><code class="directive"><a href="#loglevel">LogLevel</a></code></li>
<li><a href="../logs.html">Apache HTTP Server Log Files</a></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ExtendedStatus" id="ExtendedStatus">ExtendedStatus</a> <a name="extendedstatus" id="extendedstatus">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Keep track of extended status information for each
request</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ExtendedStatus On|Off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>ExtendedStatus Off[*]</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table><p>このディレクティブの解説文書は
まだ翻訳されていません。英語版をご覧ください。
</p></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FileETag" id="FileETag">FileETag</a> <a name="fileetag" id="fileetag">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>ETag HTTP 応答ヘッダを作成するために使用される
ファイルの属性</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>FileETag <var>component</var> ...</code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>FileETag INode MTime Size</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p>
<code class="directive">FileETag</code> ディレクティブは
ドキュメントがファイルに基づいたものであるときに、
<code>ETag</code> (エンティティタグ) 応答ヘッダフィールドを作成するときに使用する
ファイルの属性を設定します。 (<code>ETag</code> の値はネットワークの帯域を節約するための
キャッシュの管理で使われます。) Apache 1.3.22 以前では、<code>ETag</code> の値は
<em>常に</em>ファイルの inode, サイズ、最終修正時刻 (mtime) から作成
されていました。<code class="directive">FileETag</code> ディレクティブにより、これらのどれを使うかを
選ぶことができます。認識されるキーワードは:
</p>
<dl>
<dt><strong>INode</strong></dt>
<dd>ファイルの inode 番号を計算に使います</dd>
<dt><strong>MTime</strong></dt>
<dd>ファイルの最終修正時刻を使います</dd>
<dt><strong>Size</strong></dt>
<dd>ファイルの中身のバイト数を使います</dd>
<dt><strong>All</strong></dt>
<dd>使用可能なすべてのフィールドを使います。
これは <div class="example"><p><code>FileETag INode MTime Size</code></p></div> と等価です。</dd>
<dt><strong>None</strong></dt>
<dd>ドキュメントがファイルに基づいたものでも、<code>ETag</code> フィールドを
応答に付加しません</dd>
</dl>
<p><code>INode</code>, <code>MTime</code>, <code>Size</code> キーワードには
<code>+</code> や <code>-</code> を前に付けて
指定することもできます。この場合は、より広い範囲から継承された
デフォルトの設定に変更を加えるようになります。そのような接頭辞の
無いキーワードを指定すると、即座に継承した設定を無効にします。</p>
<p>あるディレクトリの設定に
<code>FileETag INode MTime Size</code> があり、
サブディレクトリの設定に <code>FileETag -INode</code> があるときは、
そのサブディレクトリの設定は (設定が上書きされなければサブディレクトリの
サブディレクトリにも継承されます) <code>FileETag MTime Size</code>
と同じになります。</p>
<div class="warning"><h3>警告</h3>
WebDAV を使っていて、<code class="module"><a href="../mod/mod_dav_fs.html">mod_dav_fs</a></code> をストレージプロバイダとして
使っているような Directory や Location では、デフォルト値を変更しないでください。
<code class="module"><a href="../mod/mod_dav_fs.html">mod_dav_fs</a></code> では、条件付リクエストでの比較演算に
<code>INode MTime Size</code>
の固定フォーマットを使っています。
<code class="directive">FileETag</code> で <code>ETag</code> フォーマットを
変更してしまうと、条件付リクエストでうまく動作しなくなります。
</div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="Files" id="Files"><Files></a> <a name="files" id="files">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>マッチするファイル名に適用されるディレクティブを囲む</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><Files <var>filename</var>> ... </Files></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p><code class="directive"><Files></code> ディレクティブは、
その中にあるディレクティブの適用範囲をファイル名で制限します。
<code class="directive"><a href="#directory"><Directory></a></code> ディレクティブや <code class="directive"><a href="#location"><Location></a></code> ディレクティブと
同じような機能を持ちます。
これは、<code></Files></code> ディレクティブと対に
なっていなければなりません。
このセクション中のディレクティブは、ベース名 (ファイル名の最後の部分)
が指定されたファイル名にマッチするすべてのオブジェクトに適用されます。
<code class="directive"><Files></code> セクションは
<code class="directive"><Directory></code> セクションと
<code>.htaccess</code> が読み込まれた後、
<code class="directive"><Location></code> セクションよりは先に
設定ファイルに現れた順に適用されます。
<code class="directive"><Files></code> は、
<code class="directive"><Directory></code> セクション内に
ネストさせることができ、
ファイルシステムの一部にのみ限定して適用させることができます。</p>
<p><var>filename</var> 引数は、ファイル名かワイルドカード文字列
で、ワイルドカードでは <code>?</code> は一つの文字、<code>*</code> は任意の文字列にマッチします。
<code>~</code> という文字を付加することで<a class="glossarylink" href="../glossary.html#regex" title="用語集を参照">正規表現</a>を使うこともできます。
例えば、</p>
<div class="example"><p><code>
<Files ~ "\.(gif|jpe?g|png)$">
</code></p></div>
<p>とすることにより、一般的なインターネットの画像フォーマットにマッチします。
ただし、
<code class="directive"><a href="#filesmatch"><FilesMatch></a></code> を使う方が
推奨されています。</p>
<p>ちなみに、<code class="directive"><a href="#directory"><Directory></a></code> と <code class="directive"><a href="#location"><Location></a></code> セクションとは異なり、
<code class="directive"><Files></code>
は <code>.htaccess</code> ファイル内で利用することができます。
これにより、ユーザがファイル毎にアクセスの制御を行なうことができるように
なっています。</p>
<h3>参照</h3>
<ul>
<li>リクエストを受けた際にこれらの異なるセクションが
組み合わされる方法については <a href="../sections.html">
<Directory>, <Location>, <Files> セクションの動作法</a></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FilesMatch" id="FilesMatch"><FilesMatch></a> <a name="filesmatch" id="filesmatch">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>正規表現にマッチするファイル名に適用される
ディレクティブを囲む</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><FilesMatch <var>regex</var>> ... </FilesMatch></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p><code class="directive"><FilesMatch></code> ディレクティブは、
<code class="directive"><a href="#files"><Files></a></code>
ディレクティブ同様にその中にあるディレクティブの適用範囲をファイル名で制限します。ただし、
このディレクティブには<a class="glossarylink" href="../glossary.html#regex" title="用語集を参照">正規表現</a>を指定します。
例えば:</p>
<div class="example"><p><code>
<FilesMatch "\.(gif|jpe?g|png)$">
</code></p></div>
<p>は一般的なインターネットの画像形式にマッチします。</p>
<h3>参照</h3>
<ul>
<li>リクエストを受けた際にこれらの異なるセクションが
組み合わされる方法については <a href="../sections.html">
<Directory>, <Location>, <Files> セクションの動作法</a></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FlushMaxPipelined" id="FlushMaxPipelined">FlushMaxPipelined</a> <a name="flushmaxpipelined" id="flushmaxpipelined">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Maximum number of pipelined responses above which they are flushed
to the network</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>FlushMaxPipelined <var>number</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>FlushMaxPipelined 5</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>2.4.47 and later</td></tr>
</table><p>このディレクティブの解説文書は
まだ翻訳されていません。英語版をご覧ください。
</p></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="FlushMaxThreshold" id="FlushMaxThreshold">FlushMaxThreshold</a> <a name="flushmaxthreshold" id="flushmaxthreshold">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Threshold above which pending data are flushed to the
network</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>FlushMaxThreshold <var>number-of-bytes</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>FlushMaxThreshold 65535</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>2.4.47 and later</td></tr>
</table><p>このディレクティブの解説文書は
まだ翻訳されていません。英語版をご覧ください。
</p></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ForceType" id="ForceType">ForceType</a> <a name="forcetype" id="forcetype">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>すべてのマッチするファイルが指定の MIME コンテントタイプで
送られるようにする</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ForceType <var>MIME-type</var>|None</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>FileInfo</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Apache 2.0 で core に移動</td></tr>
</table>
<p><code>.htaccess</code> や <code class="directive"><a href="#directory"><Directory></a></code> セクション、
<code class="directive"><a href="#location"><Location></a></code> セクション、
<code class="directive"><a href="#files"><Files></a></code> セクションに
書かれた場合、このディレクティブはそこにあるすべてのファイルが
<var>MIME-type</var>
で指定されたコンテントタイプとして扱われるようにします。たとえば、
GIF ファイルばかりのディレクトリがあって、すべてのファイルを <code>.gif</code>
で終わらせたくはないときに、以下のものを使用します:</p>
<div class="example"><p><code>
ForceType image/gif
</code></p></div>
<p><code class="directive"><a href="#defaulttype">DefaultType</a></code> と違って
このディレクティブはメディアタイプを決めることができるかもしれない
ファイルの拡張子も含め、すべての MIME タイプの関連付けを
上書きすることに注意してください。</p>
<p><code>None</code> という値を使うことで <code class="directive">ForceType</code> の
設定を無効にできます:</p>
<div class="example"><p><code>
# force all files to be image/gif:<br />
<Location /images><br />
<span class="indent">
ForceType image/gif<br />
</span>
</Location><br />
<br />
# but normal mime-type associations here:<br />
<Location /images/mixed><br />
<span class="indent">
ForceType None<br />
</span>
</Location>
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="GprofDir" id="GprofDir">GprofDir</a> <a name="gprofdir" id="gprofdir">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Directory to write gmon.out profiling data to. </td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>GprofDir <var>/tmp/gprof/</var>|<var>/tmp/gprof/</var>%</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table><p>このディレクティブの解説文書は
まだ翻訳されていません。英語版をご覧ください。
</p></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="HostnameLookups" id="HostnameLookups">HostnameLookups</a> <a name="hostnamelookups" id="hostnamelookups">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>クライアントの IP アドレスの DNS ルックアップを
有効にする</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>HostnameLookups On|Off|Double</code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>HostnameLookups Off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p>このディレクティブは、ホスト名をログ収集できるように
DNS ルックアップを有効にします
(さらに、CGI/SSI に <code>REMOTE_HOST</code> 変数として渡します)。
<code>Double</code>を指定した場合、2 重の逆引きを行ないます。
つまり、逆引きの後に、その結果に対して正引きを行ないます。正引きの
結果の IP アドレスの中にオリジナルのアドレスと一致するものがなければ
なりません。("tcpwrappers" の用語では <code>PARANOID</code> と呼ばれています。)</p>
<p><code class="module"><a href="../mod/mod_authz_host.html">mod_authz_host</a></code> でホスト名によるアクセス
制御を行なう場合には、
設定の如何によらず 2 重の逆引きが実行されます。
これは、セキュリティを保つために必要です。
<code>HostnameLookups Double</code> を設定しない限り、
他の部分はこの 2 重逆引きの結果を使うことはできません。
例えば、<code>HostnameLookups On</code> と設定してある状態で、
ホスト名によるアクセス制限を行なったオブジェクトへの
リクエストを受けたとすると、2 重の逆引きが成功するか否かによらず、
<code>REMOTE_HOST</code> には通常の逆引き結果が渡されます。</p>
<p>ディレクティブのデフォルトは
本当に逆引きを必要としているわけではないサイトの
ネットワークトラフィックを低減させるために、<code>Off</code> になっています。
ルックアップによる余計な遅延がなくなるため、
エンドユーザにとっても良いでしょう。
DNS のルックアップには、かなりの時間が必要となる場合が多く、
負荷の高いサイトではこのディレクティブは <code>Off</code> にすべきです。
なお、<var>/support</var> ディレクトリに含まれ、デフォルトでは
インストールディレクトリの <code>bin</code> サブディレクトリに
インストールされる <code class="program"><a href="../programs/logresolve.html">logresolve</a></code> ユーティリティにより、
Apache の動作とは別に、ログに残されている IP アドレスからホスト名を
ルックアップすることが可能です。</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="HttpProtocolOptions" id="HttpProtocolOptions">HttpProtocolOptions</a> <a name="httpprotocoloptions" id="httpprotocoloptions">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Modify restrictions on HTTP Request Messages</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>HttpProtocolOptions [Strict|Unsafe] [RegisteredMethods|LenientMethods]
[Allow0.9|Require1.0]</code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>HttpProtocolOptions Strict LenientMethods Allow0.9</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>2.2.32 or 2.4.24 and later</td></tr>
</table><p>このディレクティブの解説文書は
まだ翻訳されていません。英語版をご覧ください。
</p></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="If" id="If"><If></a> <a name="if" id="if">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>実行時、リクエストが条件を満たした場合にのみ適用される
ディレクティブを包含する</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><If <var>expression</var>> ... </If></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p><code class="directive"><If></code> ディレクティブは
実行時に式を評価し、条件式が真になるときにのみ
内包するディレクティブを適用します。
例えば</p>
<div class="example"><p><code>
<If "$req{Host} = ''">
</code></p></div>
<p>上記例は <var>Host:</var> ヘッダの存在しない HTTP/1.0 のリクエストに
マッチします。</p>
<h3>参照</h3>
<ul>
<li><a href="../sections.html">どのように <Directory>, <Location>,
<Files> セクションが動作するか</a> では、リクエストを受けたときに、
これらの異なるセクションがどのように組み合わさるかについて記載されています。
<code class="directive"><If></code> は
<code class="directive"><Files></code>
と同じ処理順と用法になっています。</li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="IfDefine" id="IfDefine"><IfDefine></a> <a name="ifdefine" id="ifdefine">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>起動時にテストが真であるときのみに処理されるディレクティブを
囲む</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><IfDefine [!]<var>parameter-name</var>> ...
</IfDefine></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p><code><IfDefine <var>test</var>>...</IfDefine></code>
セクションは、
ディレクティブを条件付きで指定するために利用します。
<code class="directive"><IfDefine></code> セクションに
含まれるディレクティブは、<var>test</var>が
定義されているときのみ処理されます。
もし <var>test</var> が定義されていなければ、
開始と終了の指定の間のディレクティブは無視されます。</p>
<p><code class="directive"><IfDefine></code> セクションディレクティブに
指定する <var>test</var> は、
次の二つの形式のうちの一つをとります:</p>
<ul>
<li><var>parameter-name</var></li>
<li><code>!</code><var>parameter-name</var></li>
</ul>
<p>前者の場合には、<var>parameter-name</var> と名付けられたパラメータが
定義されていれば開始と終了の間のディレクティブが処理されます。
後者の場合は逆で、<em>parameter-name</em> が指定されて<strong>いない</strong>
場合に処理されます。</p>
<p><var>parameter-name</var> 引数は、サーバを起動する際に
<code class="program"><a href="../programs/httpd.html">httpd</a></code> のコマンドラインに
<code>-D<var>parameter</var></code> という形で指定するか
あるいは <code class="directive"><a href="#define">Define</a></code>
ディレクティブで指定されると定義されます。 </p>
<p><code class="directive"><IfDefine></code> セクションは
入れ子にすることができ、複数のパラメータによるテストをするために使用できます。
例:</p>
<div class="example"><p><code>
httpd -DReverseProxy -DUseCache -DMemCache ...<br />
<br />
# httpd.conf<br />
<IfDefine ReverseProxy><br />
<span class="indent">
LoadModule proxy_module modules/mod_proxy.so<br />
LoadModule proxy_http_module modules/mod_proxy_http.so<br />
<IfDefine UseCache><br />
<span class="indent">
LoadModule cache_module modules/mod_cache.so<br />
<IfDefine MemCache><br />
<span class="indent">
LoadModule mem_cache_module modules/mod_mem_cache.so<br />
</span>
</IfDefine><br />
<IfDefine !MemCache><br />
<span class="indent">
LoadModule cache_disk_module modules/mod_cache_disk.so<br />
</span>
</IfDefine>
</span>
</IfDefine>
</span>
</IfDefine>
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="IfDirective" id="IfDirective"><IfDirective></a> <a name="ifdirective" id="ifdirective">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Encloses directives that are processed conditional on the
presence or absence of a specific directive</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><IfDirective [!]<var>directive-name</var>> ...
</IfDirective></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available in 2.4.34 and later.</td></tr>
</table><p>このディレクティブの解説文書は
まだ翻訳されていません。英語版をご覧ください。
</p><h3>参照</h3>
<ul>
<li><code class="directive"><a href="#ifsection"><IfSection></a></code></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="IfFile" id="IfFile"><IfFile></a> <a name="iffile" id="iffile">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Encloses directives that will be processed only
if file exists at startup</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><IfFile [!]<var>filename</var>> ...
</IfFile></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available in 2.4.34 and later.</td></tr>
</table><p>このディレクティブの解説文書は
まだ翻訳されていません。英語版をご覧ください。
</p></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="IfModule" id="IfModule"><IfModule></a> <a name="ifmodule" id="ifmodule">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>モジュールの存在するかしないかに応じて処理される
ディレクティブを囲む</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><IfModule [!]<var>module-file</var>|<var>module-identifier</var>> ...
</IfModule></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>モジュール識別子はバージョン 2.1 以降で使用可能。</td></tr>
</table>
<p><code><IfModule <var>test</var>>...</IfModule></code>
セクションは、モジュールが存在するときに処理されるディレクティブを
指定するために利用します。
<code class="directive"><IfModule></code> セクションに
含まれるディレクティブは、<var>test</var>
で指定するモジュールが組み込まれているときのみ処理されます。
もし <var>test</var> が組み込まれていなければ、開始と終了の間のディレクティブ
は無視されます。</p>
<p><code class="directive"><IfModule></code> セクションディレクティブに
指定する <var>test</var> は、
次の二つの形式のうちの一つをとります。</p>
<ul>
<li><var>module</var></li>
<li>!<var>module</var></li>
</ul>
<p>前者の場合は、<var>module</var> と名付けられたモジュールが
Apache に組み込まれていれば
(コンパイル済みのものと、<code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code> を利用して
動的に読み込んだものの両方)、
開始と終了の間のディレクティブが処理されます。
後者の場合は逆で、<var>module</var> が組み込まれて<strong>いない</strong>
場合に処理されます。</p>
<p><var>module</var> 引数は、モジュール識別子か
コンパイルをした時のモジュールのファイル名です。
例えば、<code>rewrite_module</code> は識別子で
<code>mod_rewrite.c</code> はファイル名です。
モジュールが複数のソースファイルから構成されている場合は、文字列
<code>STANDARD20_MODULE_STUFF</code> があるファイルの名前を
使ってください。</p>
<p><code class="directive"><IfModule></code> セクションは
入れ子にすることが可能であり、
複数のモジュールのテストを行なうために使用できます。</p>
<div class="note">特定のモジュールの存在に関わらず動作する
設定ファイルの原本が必要なときにのみこのセクションを使用してください。
通常の動作では、ディレクティブを
<code class="directive"><IfModule></code> セクションの中に
入れる必要はありません。</div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="IfSection" id="IfSection"><IfSection></a> <a name="ifsection" id="ifsection">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Encloses directives that are processed conditional on the
presence or absence of a specific section directive</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><IfSection [!]<var>section-name</var>> ...
</IfSection></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available in 2.4.34 and later.</td></tr>
</table><p>このディレクティブの解説文書は
まだ翻訳されていません。英語版をご覧ください。
</p><h3>参照</h3>
<ul>
<li><code class="directive"><a href="#ifdirective"><IfDirective></a></code></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="Include" id="Include">Include</a> <a name="include" id="include">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>サーバ設定ファイル中から他の設定ファイルを取り込む</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>Include <var>file-path</var>|<var>directory-path</var></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>ワイルドカードによるマッチは 2.0.41 以降で使用可能</td></tr>
</table>
<p>このディレクティブにより、サーバの設定ファイルから
他の設定ファイルをインクルードすることができます。</p>
<p>複数のファイルをアルファベット順に一度に読み込むために、
シェル形式 (<code>fnmatch</code>) のワイルドカード文字を使うことができます。
さらに、<code class="directive">Include</code> にディレクトリを指定した場合は、
ディレクトリとそのサブディレクトリ内の全てのファイルを
アルファベット順に読み込んで、設定ファイルとして処理します。
しかし、ディレクトリ全体を読み込むのはお勧めできません。
ふとしたことから <code>httpd</code> が読み込みに失敗するような
一時ファイルをディレクトリに残してしまうようなことがよくあるからです。</p>
<p>指定するファイルパスは絶対パスか、
<code class="directive"><a href="#serverroot">ServerRoot</a></code> ディレクトリからの
相対パスか、のどちらかです。</p>
<p>例:</p>
<div class="example"><p><code>
Include /usr/local/apache2/conf/ssl.conf<br />
Include /usr/local/apache2/conf/vhosts/*.conf
</code></p></div>
<p><code class="directive"><a href="#serverroot">ServerRoot</a></code> からの相対パスの場合は:</p>
<div class="example"><p><code>
Include conf/ssl.conf<br />
Include conf/vhosts/*.conf
</code></p></div>
<h3>参照</h3>
<ul>
<li><code class="program"><a href="../programs/apachectl.html">apachectl</a></code></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="IncludeOptional" id="IncludeOptional">IncludeOptional</a> <a name="includeoptional" id="includeoptional">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Includes other configuration files from within
the server configuration files</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>IncludeOptional <var>file-path</var>|<var>directory-path</var>|<var>wildcard</var></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available in 2.3.6 and later. Not existent file paths without wildcards
do not cause SyntaxError after 2.4.30</td></tr>
</table><p>このディレクティブの解説文書は
まだ翻訳されていません。英語版をご覧ください。
</p><h3>参照</h3>
<ul>
<li><code class="directive"><a href="#include">Include</a></code></li>
<li><code class="program"><a href="../programs/apachectl.html">apachectl</a></code></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="KeepAlive" id="KeepAlive">KeepAlive</a> <a name="keepalive" id="keepalive">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>HTTP の持続的な接続を有効にする</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>KeepAlive On|Off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>KeepAlive On</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p>HTTP/1.0 の Keep-Alive 拡張と HTTP/1.1 の持続的接続の機能は、
複数のリクエストが同じ TCP の接続で送られる、長時間持続する
HTTP セッションを提供します。たくさんの画像が
含まれる HTML ドキュメントでは場合によっては遅延時間が 50% 短縮される結果も
でています。Keep-Alive 接続を有効にするには
<code>KeepAlive On</code> と設定します。</p>
<p>HTTP/1.0 に対応したクライアントの際には、
クライアントより特に要求があった場合のみ Keep-Alive 接続となります。
さらに、HTTP/1.0 クライアントでは、コンテンツの容量が先に
(訳注: 要求に対して応答を返す前に) わかる場合のみ Keep-Alive
接続を利用できます。
これは、CGI の出力や SSI のページ、
サーバが生成したディレクトリのリストのような動的コンテンツを
HTTP/1.0 クライアントに送る場合には Keep-Alive 接続を使えないことを意味します。
HTTP/1.1 に対応したクライアントの際には、
特に指定されない限りはデフォルトとして持続的な接続が行なわれます。
クライアントが要求すれば、コンテンツの容量を判別できないものを
持続的な接続を通して送るために、チャンクエンコーディングが用いられます。</p>
<p>クライアントが Keep-Alive コネクションを使用している場合、
そのコネクションを通してどれだけたくさんのリクエストが処理されても、
それは「リクエスト」1 つとして、MaxRequestsPerChild ディレクティブでは
数えられます。</p>
<h3>参照</h3>
<ul>
<li><code class="directive"><a href="#maxkeepaliverequests">MaxKeepAliveRequests</a></code></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="KeepAliveTimeout" id="KeepAliveTimeout">KeepAliveTimeout</a> <a name="keepalivetimeout" id="keepalivetimeout">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>持続的な接続で次のリクエストが来るまでサーバが待つ時間</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>KeepAliveTimeout <var>seconds</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>KeepAliveTimeout 5</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p>接続を閉じる前に、Apache が次のリクエストを何秒待つかを指定します。
リクエストを受け付けた後は、<code class="directive"><a href="#timeout">Timeout</a></code> ディレクティブによって
指定されたタイムアウト値が使われます。</p>
<p><code class="directive">KeepAliveTimeout</code> を大きな値に設定すると、
負荷の高いサーバにおいてはパフォーマンスの問題を引き起こす場合があります。
タイムアウトが長ければ長いほど、より多くのサーバプロセスが
活性でないクライアントからの接続の終了を待ち続けることになります。</p>
<p>名前ベースのバーチャルホストコンテキストでは、
<code class="directive"><a href="#namevirtualhost">NameVirtualHost</a></code>
のセットの中で最初に定義されたバーチャルホストの値
(デフォルトホスト) が使われます。
その他の値は無視されます。</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="Limit" id="Limit"><Limit></a> <a name="limit" id="limit">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>囲いの中にあるアクセス制御の適用を特定の HTTP メソッドのみに
制限する</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><Limit <var>method</var> [<var>method</var>] ... > ...
</Limit></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p>アクセス制御は、通常<strong>全ての</strong>アクセスメソッドに対して
影響し、普通はこれが望ましい挙動です。
<strong>そうしたことから、大部分の場合にはアクセス制御に関わるディレクティブを
<code class="directive"><Limit></code> セクション内に
書くべきではありません。 </strong></p>
<p><code class="directive"><Limit></code> ディレクティブの
目的は、アクセス制御の範囲を
指定された HTTP メソッドに限定するためです。
それ以外のメソッドは、<code class="directive"><Limit></code> で囲われたアクセス制御の
<strong>影響を受けません</strong>。
以下の例は、<code>POST</code>, <code>PUT</code>, <code>DELETE</code> のメソッドに対してのみアクセスの制御を行ない、
それ以外のメソッドについては制限しません:</p>
<div class="example"><p><code>
<Limit POST PUT DELETE><br />
<span class="indent">
Require valid-user<br />
</span>
</Limit>
</code></p></div>
<p>メソッド名には以下の中から一つ以上を列挙することができます:
<code>GET</code>,
<code>POST</code>, <code>PUT</code>, <code>DELETE</code>,
<code>CONNECT</code>, <code>OPTIONS</code>,
<code>PATCH</code>, <code>PROPFIND</code>, <code>PROPPATCH</code>,
<code>MKCOL</code>, <code>COPY</code>, <code>MOVE</code>,
<code>LOCK</code>, <code>UNLOCK</code>. <strong>メソッド名は
大文字小文字を区別します。</strong> <code>GET</code> を指定した場合には
<code>HEAD</code> リクエストにも制限がかかります。<code>TRACE</code>
メソッドに制限をかけることはできません
(<code class="directive"><a href="#traceenable"><TraceEnable></a></code> 参照)。</p>
<div class="warning">アクセス制御が目的の場合は
<code class="directive"><a href="#limit"><Limit></a></code>
セクションの代わりに <code class="directive"><a href="#limitexcept"><LimitExcept></a></code> セクションを使用した方が良いでしょう。
<code class="directive"><a href="#limitexcept"><LimitExcept></a></code>
セクションでは不特定のメソッドに対しても防御できるからです。</div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="LimitExcept" id="LimitExcept"><LimitExcept></a> <a name="limitexcept" id="limitexcept">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>指定されたもの以外の HTTP メソッドにアクセス制御を
制限する</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><LimitExcept <var>method</var> [<var>method</var>] ... > ...
</LimitExcept></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p><code class="directive"><LimitExcept></code> と
<code></LimitExcept></code> は、引数に
<strong>含まれていない</strong>
HTTP のアクセスメソッドに適用するためのアクセス制御
ディレクティブを括るために利用します。
つまり、<code class="directive"><a href="#limit"><Limit></a></code> セクションの反対の動作をし、
標準のメソッドと標準外や未認識のメソッドの場合の両方を設定できます。
<code class="directive"><a href="#limit"><Limit></a></code> のドキュメントも
併せて参照してください。</p>
<p>例:</p>
<div class="example"><p><code>
<LimitExcept POST GET><br />
<span class="indent">
Require valid-user<br />
</span>
</LimitExcept>
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="LimitInternalRecursion" id="LimitInternalRecursion">LimitInternalRecursion</a> <a name="limitinternalrecursion" id="limitinternalrecursion">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>内部リダイレクトと入れ子になったサブリクエストの最大数を決定する</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>LimitInternalRecursion <var>number</var> [<var>number</var>]</code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>LimitInternalRecursion 10</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Apache 2.0.47 以降で使用可能</td></tr>
</table>
<p>内部リダイレクトは例えば <code class="directive">Action</code> ディレクティブを
使っているときに起こります。<code class="directive">Action</code> ディレクティブは
元々のリクエストを CGI スクリプトに内部リダイレクトを行ないます。
サブリクエストはいくつかの URI に対して、リクエストされたときに
何が起こるかを調べるための Apache の機構です。例えば、<code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code>
は <code class="directive"><a href="../mod/mod_dir.html#directoryindex">DirectoryIndex</a></code> ディレクティブ
がリストするファイルを調べるためにサブリクエストを使います。</p>
<p><code class="directive">LimitInternalRecursion</code> は内部リダイレクトや
サブリクエストが無限ループに陥ったときのサーバクラッシュを防ぎます。
普通、そのようなループは設定に失敗したときに発生します。</p>
<p>このディレクティブは、リクエスト毎に評価される、二つの違う限界値を
設定します。最初の <var>number</var> は、起こり得る
内部リクエストの最大値を設定します。二つめの <var>number</var> は
サブリクエストが入れ子にできる深さを設定します。<var>number</var> を
一つだけ指定したときは、両方の限界値にその値が設定されます。</p>
<div class="example"><h3>例</h3><p><code>
LimitInternalRecursion 5
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="LimitRequestBody" id="LimitRequestBody">LimitRequestBody</a> <a name="limitrequestbody" id="limitrequestbody">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>クライアントから送られる HTTP リクエストのボディの
総量を制限する</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>LimitRequestBody <var>bytes</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>LimitRequestBody 0</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p>このディレクティブは、リクエストボディに許されるバイト数、<var>bytes</var>
を 0 (無制限を意味します) から 2147483647 (2GB) までの数値で指定します。</p>
<p><code class="directive">LimitRequestBody</code> ディレクティブは、
ディレクティブが書かれたコンテキスト
(サーバ全体、ディレクトリ、ファイル、ロケーション) 内で
許容する HTTP リクエストメッセージボディのサイズに制限をかけることができます。
クライアントのリクエストがその制限値を越えていれば、
サーバはリクエストを処理せずにエラーを返します。
普通のリクエストメッセージボディのサイズは、リソースの種類や
許可されているメソッドによって大きく変わります。
CGI スクリプトは、よく情報を受信するために
メッセージボディを使います。
<code>PUT</code> メソッドの実装は、このディレクティブの値として
少なくともあるリソースに対してサーバが受け付けようとする
表現の大きさほどの値を必要とします。</p>
<p>このディレクティブは、
管理者にクライアントからの異常なリクエストを制御できるようにし、
何らかの形のサービス拒否攻撃 (訳注:DoS) を避けるのに有効です。</p>
<p>ある場所へのファイルアップロードを許可する場合に、
アップロードできるファイルのサイズを 100K に制限したければ、
以下のように指定します:</p>
<div class="example"><p><code>
LimitRequestBody 102400
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="LimitRequestFields" id="LimitRequestFields">LimitRequestFields</a> <a name="limitrequestfields" id="limitrequestfields">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>クライアントからの HTTP リクエストのヘッダフィールドの数を
制限する</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>LimitRequestFields <var>number</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>LimitRequestFields 100</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p><var>number</var> には、0 (無制限を意味します) から 32767
までの整数を指定します。
デフォルト値は、定数 <code>DEFAULT_LIMIT_REQUEST_FIELDS</code>
によりコンパイル時に定義されます (配布時には 100 と指定されています)。</p>
<p><code class="directive">LimitRequestBody</code> ディレクティブは、
サーバ管理者が HTTP リクエスト中において許可するリクエストヘッダフィールド数を
指定します。
サーバはこの値には通常のクライアントからのリクエストに含まれるであろう
フィールドの数より大きな値が必要とします。
クライアントにより使われた要求ヘッダーフィールドの数が
20 を超えることはほとんどありませんが、
これは種々のクライアントの実装によって変わり、
詳細なコンテントネゴシエーションをするためのブラウザの設定までにも
影響されることがあります。
オプションの HTTP 拡張はリクエストヘッダフィールドを使って表される場合が
多くあります。</p>
<p>このディレクティブは、
管理者にクライアントからの異常なリクエストを制御できるようにし、
何らかの形のサービス拒否攻撃 (訳注:DoS) を避けるのに有効です。
リクエストのフィールドが多過ぎることを意味するエラー応答が
普通のクライアントに返されるような時はこの値を増やしてください。</p>
<p>例:</p>
<div class="example"><p><code>
LimitRequestFields 50
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="LimitRequestFieldSize" id="LimitRequestFieldSize">LimitRequestFieldSize</a> <a name="limitrequestfieldsize" id="limitrequestfieldsize">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>クライアントからの HTTP リクエストのヘッダの
サイズを制限する</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>LimitRequestFieldSize <var>bytes</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>LimitRequestFieldSize 8190</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p>このディレクティブは、HTTP リクエストヘッダ一つで受付ける
バイト数 <var>bytes</var> を指定します。</p>
<p><code class="directive">LimitRequestFieldSize</code> ディレクティブは、
HTTP リクエストヘッダで許容されるサイズを増減させることができます。
サーバは、このディレクティブの値として、
一般的なクライアントからリクエストが送られた際に、そのリクエストに
付属しているどのヘッダフィールドについても、
十分足りる大きさになっていなければなりません。
一般的なリクエストヘッダのサイズといっても、その大きさは個々の
クライアントの実装によって大きく異なり、
詳細なコンテントネゴシエーションをサポートするかどうかの、
ブラウザの設定にも影響されたりします。
SPNEGO 認証ヘッダでは 12392 バイトにまで及ぶことすらあります。</p>
<p>このディレクティブは、
管理者にクライアントからの異常なリクエストを制御できるようにし、
何らかの形のサービス拒否攻撃 (訳注:DoS) を避けるのに有効です。</p>
<p>例:</p>
<div class="example"><p><code>
LimitRequestFieldSize 4094
</code></p></div>
<div class="note">通常はデフォルトから変更する必要はありません。</div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="LimitRequestLine" id="LimitRequestLine">LimitRequestLine</a> <a name="limitrequestline" id="limitrequestline">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>クライアントからの HTTP リクエスト行のサイズを制限する</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>LimitRequestLine <var>bytes</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>LimitRequestLine 8190</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p>このディレクティブは、HTTP リクエスト行内で許容されるバイト数
<var>bytes</var> を指定します。</p>
<p><code class="directive">LimitRequestLine</code> ディレクティブにより、
クライアントからの HTTP リクエスト行の許容サイズを増減できます。
リクエスト行は、HTTPメソッド、URI、プロトコルバージョンから成っており、
<code class="directive">LimitRequestLine</code> はサーバへのリクエストに対して
許容するリクエスト URI の長さを制限することになります。
サーバは、<code>GET</code> リクエストのクエリ部分も含めて、リソースの名前が入るに足る
大きさを必要とします。</p>
<p>このディレクティブは、
管理者にクライアントからの異常なリクエストを制御できるようにし、
何らかの形のサービス拒否攻撃 (訳注:DoS) を避けるのに有効です。</p>
<p>例:</p>
<div class="example"><p><code>
LimitRequestLine 4094
</code></p></div>
<div class="note">通常はデフォルトから変更する必要はありません。</div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="LimitXMLRequestBody" id="LimitXMLRequestBody">LimitXMLRequestBody</a> <a name="limitxmlrequestbody" id="limitxmlrequestbody">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>XML 形式のリクエストのボディのサイズを制限する</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>LimitXMLRequestBody <var>bytes</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>LimitXMLRequestBody 1000000</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>All</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p>XML 形式のリクエストのボディの最大値を (バイト単位で) 制限します。
値に <code>0</code> を指定するとチェックを無効にします。</p>
<p>例:</p>
<div class="example"><p><code>
LimitXMLRequestBody 0
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="Location" id="Location"><Location></a> <a name="location" id="location">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>囲んだディレクティブをマッチする URL のみに適用</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><Location
<var>URL-path</var>|<var>URL</var>> ... </Location></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p><code class="directive"><Location></code> ディレクティブは、
URL により中に書かれたディレクティブの適用範囲を制限します。
<code class="directive"><a href="#directory"><Directory></a></code>
ディレクティブと似ていて、
<code></Location></code> ディレクティブで終了する
サブセクションを開始します。
<code class="directive"><Location></code> セクションは、
<code class="directive"><a href="#directory"><Directory></a></code> セクションと
<code>.htaccess</code> の読み込みの後、
<code class="directive"><a href="#files"><Files></a></code> セクションを
適用した後に、設定ファイルに現れた順に処理されます。</p>
<p><code class="directive"><Location></code> セクションは
完全にファイルシステムと関連せずに動作します。このことから導かれる
結果にはいくつか注意する点があります。最も重要なものは、
ファイルシステムの位置へのアクセス制御に <code class="directive"><Location></code> ディレクティブを使うべきではない
ということです。複数の URL がファイルシステムの同じ位置にマップされる
可能がありますので、そのようなアクセス制御は回避されてしまう可能性が
あります。</p>
<div class="note"><h3>いつ <code class="directive"><Location></code> を使うか</h3>
<p><code class="directive"><Location></code> ディレクティブは
ファイルシステム外のコンテンツにディレクティブを適用するときに
使用してください。ファイルシステムに存在するコンテンツに対しては、
<code class="directive"><a href="#directory"><Directory></a></code> と <code class="directive"><a href="#files"><Files></a></code> を使ってください。
例外は、<code><Location /></code> で、これはサーバ全体に対して
設定を適用する簡単な方法です。</p>
</div>
<p>全ての (プロキシ以外の) リクエストに対し、
URL は <code>/path/</code> という、
接頭辞 <code>http://servername</code> を含まない形でマッチします。
プロキシリクエストの場合には、<code>scheme://servername/path</code>
という接頭辞を含む形でマッチし、接頭辞を含めて指定する必要があります。</p>
<p>URL にはワイルドカードを利用することができます。
<code>?</code> は任意の一文字、<code>*</code> は任意の文字列にマッチします。
どちらのワイルドカードも URL パス中の / にはマッチしません。</p>
<p><code>~</code> という文字を追加することで、<a class="glossarylink" href="../glossary.html#regex" title="用語集を参照">正規表現</a>を
利用することもできます。
例えば:</p>
<div class="example"><p><code>
<Location ~ "/(extra|special)/data">
</code></p></div>
<p>は URL に <code>/extra/data</code> か <code>/special/data</code> という文字列が
含まれている場合にマッチします。
<code class="directive"><a href="#locationmatch"><LocationMatch></a></code> ディレクティブは
<code class="directive"><Location></code> の正規表現
版とまったく同じ動作をします。</p>
<p><code class="directive"><Location></code> 機能は、<code class="directive"><a href="#sethandler">SetHandler</a></code> ディレクティブと
組合わせて利用すると特に便利です。
例えば、<code>example.com</code> のブラウザからのみステータスの参照を有効にしたければ、
次のようにすれば良いでしょう。</p>
<div class="example"><p><code>
<Location /status><br />
<span class="indent">
SetHandler server-status<br />
Order Deny,Allow<br />
Deny from all<br />
Allow from .example.com<br />
</span>
</Location>
</code></p></div>
<div class="note"><h3>/ (スラッシュ) に関する注</h3>
<p>スラッシュ文字は、URL 内に現れる場所に応じて変化する
特別な意味を持っています。
ファイルシステムにおいて利用する場合には複数のスラッシュでも一つの
スラッシュとして扱われることが多いですが、
(<em>すなわち</em>、<code>/home///foo</code> は
<code>/home/foo</code> と同じといったように)
URL においては必ずしもそうなるわけではありません。
<code class="directive"><a href="#locationmatch"><LocationMatch></a></code>
ディレクティブや正規表現を利用した
<code class="directive"><Location></code> ディレクティブで、
複数のスラッシュにマッチさせたいときには、明示的に記述する
必要があります。</p>
<p>例えば、<code><LocationMatch ^/abc></code> は、
<code>/abc</code> というリクエスト URL にマッチしますが、
<code>//abc</code> というリクエスト URL にはマッチしません。
(正規表現でない) <code class="directive"><Location></code>
ディレクティブは、
proxy リクエストに対して利用する際には同様の振る舞いをしますが、
(正規表現でない) <code class="directive"><Location></code> を proxy
でないリクエストに対して利用する際には、
一つのスラッシュで複数のスラッシュにマッチします。
例えば、<code><Location /abc/def></code> と指定し、
<code>/abc//def</code> というリクエストがあれば、
マッチすることになります。</p></div>
<h3>参照</h3>
<ul>
<li>リクエストを受けた際にこれらの異なるセクションが
組み合わされる方法については <a href="../sections.html">
<Directory>, <Location>, <Files> セクションの動作法</a></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="LocationMatch" id="LocationMatch"><LocationMatch></a> <a name="locationmatch" id="locationmatch">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>囲んだディレクティブを正規表現にマッチする URL のみに
適用</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code><LocationMatch
<var>regex</var>> ... </LocationMatch></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p><code class="directive"><LocationMatch></code> ディレクティブは、
<code class="directive"><a href="#location"><Location></a></code> と同じ様に
URL により中に書かれたディレクティブの適用範囲を制限します。
但し、引数は普通の文字列ではなく、<a class="glossarylink" href="../glossary.html#regex" title="用語集を参照">正規表現</a>となります。
例えば、</p>
<div class="example"><p><code>
<LocationMatch "/(extra|special)/data">
</code></p></div>
<p>は URL に <code>/extra/data</code> か <code>/special/data</code>
という文字列が含まれている場合にマッチします。</p>
<h3>参照</h3>
<ul>
<li>リクエストを受けた際にこれらの異なるセクションが
組み合わされる方法については <a href="../sections.html">
<Directory>, <Location>, <Files> セクションの動作法</a></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="LogLevel" id="LogLevel">LogLevel</a> <a name="loglevel" id="loglevel">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>ErrorLog の冗長性を制御する</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>LogLevel <var>level</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>LogLevel warn</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Core</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>core</td></tr>
</table>
<p><code class="directive">LogLevel</code> は、エラーログ (<code class="directive"><a href="#errorlog">ErrorLog</a></code> ディレクティブを | | |