]> granicus.if.org Git - apache/blob - docs/manual/howto/public_html.html.ja.utf8
xforms
[apache] / docs / manual / howto / public_html.html.ja.utf8
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.5</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" /></head>
18 <body id="manual-page"><div id="page-header">
19 <p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/quickreference.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.5</p>
21 <img alt="" src="../images/feather.png" /></div>
22 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
23 <div id="path">
24 <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP サーバ</a> &gt; <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> &gt; <a href="../">バージョン 2.5</a> &gt; <a href="./">How-To / チュートリアル</a></div><div id="page-content"><div id="preamble"><h1>ユーザ毎のウェブディレクトリ</h1>
25 <div class="toplang">
26 <p><span>翻訳済み言語: </span><a href="../en/howto/public_html.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
27 <a href="../es/howto/public_html.html" hreflang="es" rel="alternate" title="Español">&nbsp;es&nbsp;</a> |
28 <a href="../fr/howto/public_html.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
29 <a href="../ja/howto/public_html.html" title="Japanese">&nbsp;ja&nbsp;</a> |
30 <a href="../ko/howto/public_html.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
31 <a href="../tr/howto/public_html.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
32 </div>
33 <div class="outofdate">この日本語訳はすでに古くなっている
34             可能性があります。
35             最近更新された内容を見るには英語版をご覧下さい。
36         </div>
37
38 <p>複数のユーザのいるシステムでは、<code class="directive"><a href="../mod/mod_userdir.html#userdir">UserDir</a></code> ディレクティブを使って
39     各ユーザがホームディレクトリにウェブサイトを構築できるように設定することが
40     可能です。URL <code>http://example.com/~username/</code> を訪れた人は
41     "<code>username</code>" というユーザの <code class="directive"><a href="../mod/mod_userdir.html#userdir">UserDir</a></code> ディレクティブで指定された
42     サブディレクトリからコンテンツを得ることになります。</p>
43
44     <p>in the default config file, and adapting the <code>httpd-userdir.conf</code>
45     file as necessary, or by including the appropriate directives in a
46     <code>Directory</code> block within the main config file.</p>
47     <p>デフォルトではこれらのディレクトリへのアクセスは<strong>許可されていません</strong>。
48     <code class="directive"><a href="../mod/mod_userdir.html#userdir">UserDir</a></code> を使って有効にできます。
49     有効にするには、デフォルトの設定ファイルで付随する
50     <code>httpd-userdir.conf</code> ファイルが必要で、
51     その中の次の行のコメントアウトを外して有効にするか、
52     </p>
53     <div class="example"><p><code>
54       #Include conf/extra/httpd-userdir.conf
55     </code></p></div>
56     <p>あるいは、メインの設定ファイル中の <code>Directory</code> 
57     ブロックの中に適切にディレクティブを記述しておきます。</p>
58 </div>
59 <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#related">ユーザ毎のウェブディレクトリ</a></li>
60 <li><img alt="" src="../images/down.gif" /> <a href="#userdir">UserDir を使ってファイルのパスを設定する</a></li>
61 <li><img alt="" src="../images/down.gif" /> <a href="#redirect">外部 URL にリダイレクトする</a></li>
62 <li><img alt="" src="../images/down.gif" /> <a href="#enable">この機能を使用できるユーザを制限する</a></li>
63 <li><img alt="" src="../images/down.gif" /> <a href="#cgi">ユーザ毎の CGI ディレクトリ</a></li>
64 <li><img alt="" src="../images/down.gif" /> <a href="#htaccess">ユーザによる設定変更を許可</a></li>
65 </ul><h3>参照</h3><ul class="seealso"><li><a href="../urlmapping.html">URL からファイルシステムへのマッピング</a></li><li><a href="#comments_section">コメント</a></li></ul></div>
66 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
67 <div class="section">
68 <h2><a name="related" id="related">ユーザ毎のウェブディレクトリ</a></h2>
69     
70     <table class="related"><tr><th>関連モジュール</th><th>関連ディレクティブ</th></tr><tr><td><ul><li><code class="module"><a href="../mod/mod_userdir.html">mod_userdir</a></code></li></ul></td><td><ul><li><code class="directive"><a href="../mod/mod_userdir.html#userdir">UserDir</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#allowoverride">AllowOverride</a></code></li></ul></td></tr></table>
71     </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
72 <div class="section">
73 <h2><a name="userdir" id="userdir">UserDir を使ってファイルのパスを設定する</a></h2>
74     
75
76     <p><code class="directive"><a href="../mod/mod_userdir.html#userdir">UserDir</a></code> ディレクティブは
77     ユーザ毎のコンテンツが読み込まれるディレクトリを指定します。
78     このディレクティブはいろいろ違った形式を取ることができます。</p>
79
80     <p>スラッシュで始まらないパスが与えられたときは、ユーザのホームディレクトリ
81     からの相対パスとみなされます。次の設定があったときに:</p>
82
83     <pre class="prettyprint lang-config">UserDir public_html</pre>
84
85
86     <p>URL <code>http://example.com/~rbowen/file.html</code> は
87     パス <code>/home/rbowen/public_html/file.html</code> へ
88     変換されます。</p>
89
90     <p>パスがスラッシュで始まるときは、ディレクトリパスはそのパスに
91     ユーザ名を加えたものからなります。次の設定のとき:</p>
92
93     <pre class="prettyprint lang-config">UserDir /var/html</pre>
94
95
96     <p>URL <code>http://example.com/~rbowen/file.html</code> は
97     パス <code>/var/html/rbowen/file.html</code> へ変換されます。</p>
98
99     <p>アスタリスク (*) を含むパスが指定されたときは、アスタリスクを
100     ユーザ名で置換したものが使用されます。このような設定だと:</p>
101
102     <pre class="prettyprint lang-config">UserDir /var/www/*/docs</pre>
103
104
105     <p>URL <code>http://example.com/~rbowen/file.html</code> は
106     パス <code>/var/www/rbowen/docs/file.html</code> へ変換されます。</p>
107
108     <p>ディレクトリやディレクトリパスを複数設定することもできます。</p>
109
110     <pre class="prettyprint lang-config">UserDir public_html /var/html</pre>
111
112
113
114     <p><code>http://example.com/~rbowen/file.html</code> という
115     URL に対しては <code>~rbowen</code> を探します。見つからなければ、
116     <code>/var/html</code> の下にある <code>rbowen</code> を探します。
117     もし見つかれば上記の URL は <code>/var/html/rbowen/file.html</code>
118     というファイルパスに変換されます。</p>
119
120   </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
121 <div class="section">
122 <h2><a name="redirect" id="redirect">外部 URL にリダイレクトする</a></h2>
123     
124     <p><code class="directive"><a href="../mod/mod_userdir.html#userdir">UserDir</a></code>
125     ディレクティブを使って外部 URL にリダイレクトすることもできます。</p>
126
127     <pre class="prettyprint lang-config">UserDir http://example.org/users/*/</pre>
128
129
130     
131     <p>上記例では <code>http://example.com/~bob/abc.html</code>
132     へのリクエストは <code>http://example.org/users/bob/abc.html</code>
133     にリダイレクトされます。</p>
134   </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
135 <div class="section">
136 <h2><a name="enable" id="enable">この機能を使用できるユーザを制限する</a></h2>
137     
138
139     <p>UserDir のドキュメントに示されている構文を使うことで、
140     どのユーザがこの機能を使うことができるかを制限することができます:</p>
141
142     <div class="example"><p><code>
143       UserDir enabled<br />
144       UserDir disabled root jro fish
145     </code></p></div>
146
147     <p>上の設定は <code>dissabled</code> 文のユーザ以外のすべてのユーザに
148     対して UserDir の機能を有効にします。同様にして、以下のように
149     数名のユーザ以外に対してこの機能を無効にすることもできます:</p>
150
151     <pre class="prettyprint lang-config">      UserDir disabled<br />
152       UserDir enabled rbowen krietz</pre>
153
154
155     <p>他の例は <code class="directive"><a href="../mod/mod_userdir.html#userdir">UserDir</a></code>
156     の説明を参照してください。</p>
157
158   </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
159 <div class="section">
160 <h2><a name="cgi" id="cgi">ユーザ毎の CGI ディレクトリ</a></h2>
161   
162
163    <p>それぞれのユーザに専用の cgi-bin ディレクトリを与えるために、
164     <code class="directive"><a href="../mod/core.html#directory">&lt;Directory&gt;</a></code>
165     を使ってユーザのホームディレクトリの指定された領域に対して CGI を有効に
166     することができます。</p>
167
168     <pre class="prettyprint lang-config">&lt;Directory /home/*/public_html/cgi-bin/&gt;
169     Options ExecCGI
170     SetHandler cgi-script
171 &lt;/Directory&gt;</pre>
172
173
174     <p>そして、<code>UserDir</code> が
175     <code>public_html</code> に設定されていると仮定すると、
176     そのディレクトリの CGI プログラム <code>example.cgi</code>
177     は以下の様に呼び出されることができます:</p>
178
179     <div class="example"><p><code>
180     http://example.com/~rbowen/cgi-bin/example.cgi
181     </code></p></div>
182
183     </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
184 <div class="section">
185 <h2><a name="htaccess" id="htaccess">ユーザによる設定変更を許可</a></h2>
186     
187
188     <p>ユーザに彼らのウェブ空間でのサーバの設定の変更を許可する場合、
189     ユーザは <code>.htaccess</code> ファイルを使って設定を変更する必要があります。
190     <code class="directive"><a href="../mod/core.html#allowoverride">AllowOverride</a></code> の値を
191     ユーザが変更することを許可したいディレクティブに対して十分なものに
192     設定していることを確認してください。この機能がどのようにして動作しているか
193     の詳細は <a href="htaccess.html">.htaccess チュートリアル</a> を読んで
194     ください。</p>
195
196   </div></div>
197 <div class="bottomlang">
198 <p><span>翻訳済み言語: </span><a href="../en/howto/public_html.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
199 <a href="../es/howto/public_html.html" hreflang="es" rel="alternate" title="Español">&nbsp;es&nbsp;</a> |
200 <a href="../fr/howto/public_html.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
201 <a href="../ja/howto/public_html.html" title="Japanese">&nbsp;ja&nbsp;</a> |
202 <a href="../ko/howto/public_html.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
203 <a href="../tr/howto/public_html.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
204 </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&amp;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>
205 <script type="text/javascript"><!--//--><![CDATA[//><!--
206 var comments_shortname = 'httpd';
207 var comments_identifier = 'http://httpd.apache.org/docs/trunk/howto/public_html.html';
208 (function(w, d) {
209     if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
210         d.write('<div id="comments_thread"><\/div>');
211         var s = d.createElement('script');
212         s.type = 'text/javascript';
213         s.async = true;
214         s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
215         (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
216     }
217     else {
218         d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
219     }
220 })(window, document);
221 //--><!]]></script></div><div id="footer">
222 <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>
223 <p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/quickreference.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[//><!--
224 if (typeof(prettyPrint) !== 'undefined') {
225     prettyPrint();
226 }
227 //--><!]]></script>
228 </body></html>