github.com/krum110487/go-htaccess@v0.0.0-20240316004156-60641c8e7598/tests/data/apache_2_2_34/manual/configuring.html.ja.utf8 (about) 1 <?xml version="1.0" encoding="UTF-8"?> 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 3 <html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head> 4 <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> 5 <!-- 6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 7 This file is generated from xml source: DO NOT EDIT 8 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 9 --> 10 <title>設定ファイル - Apache HTTP サーバ バージョン 2.2</title> 11 <link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> 12 <link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> 13 <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" /> 14 <script src="./style/scripts/prettify.min.js" type="text/javascript"> 15 </script> 16 17 <link href="./images/favicon.ico" rel="shortcut icon" /><link href="http://httpd.apache.org/docs/current/configuring.html" rel="canonical" /></head> 18 <body id="manual-page"><div id="page-header"> 19 <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> 20 <p class="apache">Apache HTTP サーバ バージョン 2.2</p> 21 <img alt="" src="./images/feather.gif" /></div> 22 <div class="up"><a href="./"><img title="<-" alt="<-" src="./images/left.gif" /></a></div> 23 <div id="path"> 24 <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.2</a></div><div id="page-content"><div class="retired"><h4>Please note</h4> 25 <p> This document refers to a legacy release (<strong>2.2</strong>) of Apache httpd. The active release (<strong>2.4</strong>) is documented <a href="http://httpd.apache.org/docs/current">here</a>. If you have not already upgraded, please follow <a href="http://httpd.apache.org/docs/current/upgrading.html">this link</a> for more information.</p> 26 <p>You may follow <a href="http://httpd.apache.org/docs/current/configuring.html">this link</a> to go to the current version of this document.</p></div><div id="preamble"><h1>設定ファイル</h1> 27 <div class="toplang"> 28 <p><span>翻訳済み言語: </span><a href="./de/configuring.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> | 29 <a href="./en/configuring.html" hreflang="en" rel="alternate" title="English"> en </a> | 30 <a href="./fr/configuring.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | 31 <a href="./ja/configuring.html" title="Japanese"> ja </a> | 32 <a href="./ko/configuring.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | 33 <a href="./tr/configuring.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> 34 </div> 35 <div class="outofdate">この日本語訳はすでに古くなっている 36 可能性があります。 37 最近更新された内容を見るには英語版をご覧下さい。 38 </div> 39 40 <p>この文書では、Apache HTTP サーバを設定するのに使用するファイルについて 41 記述しています。</p> 42 </div> 43 <div id="quickview"><ul id="toc"><li><img alt="" src="./images/down.gif" /> <a href="#main">メインの設定ファイル</a></li> 44 <li><img alt="" src="./images/down.gif" /> <a href="#syntax">設定ファイルの構文</a></li> 45 <li><img alt="" src="./images/down.gif" /> <a href="#modules">モジュール</a></li> 46 <li><img alt="" src="./images/down.gif" /> <a href="#scope">ディレクティブの適用範囲</a></li> 47 <li><img alt="" src="./images/down.gif" /> <a href="#htaccess">.htaccess ファイル</a></li> 48 </ul><ul class="seealso"><li><a href="#comments_section">コメント</a></li></ul></div> 49 <div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> 50 <div class="section"> 51 <h2><a name="main" id="main">メインの設定ファイル</a></h2> 52 53 <table class="related"><tr><th>関連モジュール</th><th>関連ディレクティブ</th></tr><tr><td><ul><li><code class="module"><a href="./mod/mod_mime.html">mod_mime</a></code></li></ul></td><td><ul><li><code class="directive"><a href="./mod/core.html#ifdefine"><IfDefine></a></code></li><li><code class="directive"><a href="./mod/core.html#include">Include</a></code></li><li><code class="directive"><a href="./mod/mod_mime.html#typesconfig">TypesConfig</a></code></li></ul></td></tr></table> 54 55 <p>Apache は <a href="mod/directives.html">ディレクティブ</a> を設定ファイルに平文で書くことにより設定します。 56 メインの設定ファイルは普通は <code>httpd.conf</code> という名前です。 57 このファイルの位置はコンパイル時に設定されますが、コマンドラインの 58 <code>-f</code> フラグにより上書きできます。 59 また、他の設定ファイルを <code class="directive"><a href="./mod/core.html#include">Include</a></code> 60 ディレクティブによって追加でき、ワイルドカードを使用して多数の 61 設定ファイルを追加することができます。 62 どんなディレクティブも、これらの設定ファイルどれにでも入れることができます。 63 Apache は起動時か再起動時のみメイン設定ファイルの変更を認識します。</p> 64 65 <p>サーバは MIME 66 ドキュメントタイプを含んでいるファイルも読み込みます。ファイル名は 67 <code class="directive"><a href="./mod/mod_mime.html#typesconfig">TypesConfig</a></code> 68 で設定され、デフォルトでは <code>mime.types</code> 69 になっています。</p> 70 </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> 71 <div class="section"> 72 <h2><a name="syntax" id="syntax">設定ファイルの構文</a></h2> 73 74 75 <p>Apache の設定ファイルは 1 行に 1 つのディレクティブからなります。 76 バックスラッシュ "\" はディレクティブが次の行に継続していることを 77 示すために行の最後の文字として使われているかもしれません。 78 行の最後とバックスラッシュの間に他の文字や空白があってはいけません。 79 </p> 80 81 <p>設定ファイルのディレクティブは大文字小文字を区別しませんが、 82 引数にはしばしば区別するものがあります。ハッシュ文字 "#" 83 で始まる行はコメントと見なされて無視されます。 84 設定ディレクティブと同一行の末尾にコメントが含まれていては<strong>いけません</strong>。ディレクティブの前の空行と空白は無視されますので、 85 わかりやすくするためにディレクティブをインデントしても構いません。 86 </p> 87 88 <p>設定ファイルの構文エラーは、 89 <code>apachectl configtest</code> 90 かコマンドラインオプション 91 <code>-t</code> を使って調べられます。</p> 92 </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> 93 <div class="section"> 94 <h2><a name="modules" id="modules">モジュール</a></h2> 95 96 97 <table class="related"><tr><th>関連モジュール</th><th>関連ディレクティブ</th></tr><tr><td><ul><li><code class="module"><a href="./mod/mod_so.html">mod_so</a></code></li></ul></td><td><ul><li><code class="directive"><a href="./mod/core.html#ifmodule"><IfModule></a></code></li><li><code class="directive"><a href="./mod/mod_so.html#loadmodule">LoadModule</a></code></li></ul></td></tr></table> 98 99 <p>Apache はモジュール化されたサーバです。 100 コアサーバには最も基本的な機能だけが含まれています。拡張機能は 101 Apache にロードされる<a href="mod/">モジュール</a>として利用可能です。デフォルトでは、コンパイル時にモジュールの 102 <a href="mod/module-dict.html#Status">Base</a> セット (基本セット) が 103 サーバに含まれます。サーバが<a href="dso.html">動的ロード</a>モジュールを使うようにコンパイルされている場合は、 104 モジュールを別にコンパイルして、いつでも 105 <code class="directive"><a href="./mod/mod_so.html#loadmodule">LoadModule</a></code> 106 ディレクティブを使って追加できます。 107 そうでない場合は、モジュールの追加や削除をするためには Apache 108 を再コンパイルする必要があります。設定ディレクティブは <code class="directive"><a href="./mod/core.html#ifmodule"><IfModule></a></code> 109 ブロックに入れることで特定のモジュールが存在するときだけ 110 設定ファイルに含まれるようにすることができます。</p> 111 112 <p>コマンドラインオプション <code>-l</code> を使って現時点で 113 どのモジュールがサーバにコンパイルされているかを知ることができます。</p> 114 </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> 115 <div class="section"> 116 <h2><a name="scope" id="scope">ディレクティブの適用範囲</a></h2> 117 118 119 <table class="related"><tr><th>関連モジュール</th><th>関連ディレクティブ</th></tr><tr><td /><td><ul><li><code class="directive"><a href="./mod/core.html#directory"><Directory></a></code></li><li><code class="directive"><a href="./mod/core.html#directorymatch"><DirectoryMatch></a></code></li><li><code class="directive"><a href="./mod/core.html#files"><Files></a></code></li><li><code class="directive"><a href="./mod/core.html#filesmatch"><FilesMatch></a></code></li><li><code class="directive"><a href="./mod/core.html#location"><Location></a></code></li><li><code class="directive"><a href="./mod/core.html#locationmatch"><LocationMatch></a></code></li><li><code class="directive"><a href="./mod/core.html#virtualhost"><VirtualHost></a></code></li></ul></td></tr></table> 120 121 <p>メイン設定ファイルにあるディレクティブはサーバ全体に適用されます。 122 サーバの一部分の設定だけを変更したい場合は <code class="directive"><a href="./mod/core.html#directory"><Directory></a></code>, <code class="directive"><a href="./mod/core.html#directorymatch"><DirectoryMatch></a></code>, <code class="directive"><a href="./mod/core.html#files"><Files></a></code>, <code class="directive"><a href="./mod/core.html#filesmatch"><FilesMatch></a></code>, <code class="directive"><a href="./mod/core.html#location"><Location></a></code>, <code class="directive"><a href="./mod/core.html#locationmatch"><LocationMatch></a></code> 123 セクションの中に置くことで適用範囲を決められます。 124 これらのセクションはその中にあるディレクティブの適用範囲を 125 特定のファイルシステムの位置や URL に限定します。 126 非常に細粒度の設定を可能にするために、 127 セクションを入れ子にすることもできます。</p> 128 129 <p>Apache は同時に多くの違うウェブサイトを扱う能力があります。 130 これは <a href="vhosts/">バーチャルホスト</a> と呼ばれています。 131 特定のウェブサイトにのみ適用されるようにするために、 132 ディレクティブは 133 <code class="directive"><a href="./mod/core.html#virtualhost"><VirtualHost></a></code> 134 セクションの中に置くことでも適用範囲を変えることができます。</p> 135 136 <p>ほとんどのディレクティブはどのセクションにでも書けますが、 137 中にはコンテキストによっては意味をなさないものもあります。 138 例えば、プロセスの作成を制御しているディレクティブはメインサーバの 139 コンテキストにのみ書くことができます。 140 どのディレクティブをどのセクションに書くことができるかを知るためには 141 ディレクティブの <a href="mod/directive-dict.html#Context">コンテキスト</a> を調べてください。詳しい情報は、 142 <a href="sections.html">Directory, Location, Files 143 セクションの動作法</a>にあります。</p> 144 </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div> 145 <div class="section"> 146 <h2><a name="htaccess" id="htaccess">.htaccess ファイル</a></h2> 147 148 149 <table class="related"><tr><th>関連モジュール</th><th>関連ディレクティブ</th></tr><tr><td /><td><ul><li><code class="directive"><a href="./mod/core.html#accessfilename">AccessFileName</a></code></li><li><code class="directive"><a href="./mod/core.html#allowoverride">AllowOverride</a></code></li></ul></td></tr></table> 150 151 <p>Apache ではウェブツリーの中に置かれた特別なファイルを使って 152 非中央集権的な設定管理をできます。その特別なファイルは普通は 153 <code>.htaccess</code> という名前で、 154 <code class="directive"><a href="./mod/core.html#accessfilename">AccessFileName</a></code> 155 ディレクティブでどんな名前にでも指定できます。 156 <code>.htaccess</code> 157 ファイルに書かれたディレクティブはファイルを置いた 158 ディレクトリとその全てのサブディレクトリに適用されます。 159 <code>.htaccess</code> ファイルは、メインの設定ファイルと同じ 160 構文を使います。 161 <code>.htaccess</code> 162 ファイルはすべてのリクエストで読み込まれるため、 163 変更はすぐに反映されます。</p> 164 165 <p>どのディレクティブが <code>.htaccess</code> 166 ファイルに書けるかを調べるには、ディレクティブの<a href="mod/directive-dict.html#Context">コンテキスト</a> 167 を調べてください。サーバ管理者はさらにメイン設定ファイルの 168 <code class="directive"><a href="./mod/core.html#allowoverride">AllowOverride</a></code> 169 を設定することでどのディレクティブを <code>.htaccess</code> 170 ファイルに書けるようにするかを制御することができます。</p> 171 172 <p><code>.htaccess</code> ファイルに関する詳しい情報は 173 <a href="howto/htaccess.html">.htaccess チュートリアル</a> 174 を参照してください。</p> 175 </div></div> 176 <div class="bottomlang"> 177 <p><span>翻訳済み言語: </span><a href="./de/configuring.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> | 178 <a href="./en/configuring.html" hreflang="en" rel="alternate" title="English"> en </a> | 179 <a href="./fr/configuring.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | 180 <a href="./ja/configuring.html" title="Japanese"> ja </a> | 181 <a href="./ko/configuring.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | 182 <a href="./tr/configuring.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> 183 </div><div class="top"><a href="#page-header"><img src="./images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">コメント</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div> 184 <script type="text/javascript"><!--//--><![CDATA[//><!-- 185 var comments_shortname = 'httpd'; 186 var comments_identifier = 'http://httpd.apache.org/docs/2.2/configuring.html'; 187 (function(w, d) { 188 if (w.location.hostname.toLowerCase() == "httpd.apache.org") { 189 d.write('<div id="comments_thread"><\/div>'); 190 var s = d.createElement('script'); 191 s.type = 'text/javascript'; 192 s.async = true; 193 s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; 194 (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); 195 } 196 else { 197 d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); 198 } 199 })(window, document); 200 //--><!]]></script></div><div id="footer"> 201 <p class="apache">Copyright 2017 The Apache Software Foundation.<br />この文書は <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> のライセンスで提供されています。.</p> 202 <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></div><script type="text/javascript"><!--//--><![CDATA[//><!-- 203 if (typeof(prettyPrint) !== 'undefined') { 204 prettyPrint(); 205 } 206 //--><!]]></script> 207 </body></html>