summaryrefslogtreecommitdiff
path: root/docs/manual/mod/mod_userdir.xml.ja
blob: a52e55f0dd28f6675186023f9d518e5b4a816918 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
<!-- English Revision: 421174 -->

<!--
 Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The ASF licenses this file to You under the Apache License, Version 2.0
 (the "License"); you may not use this file except in compliance with
 the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->

<modulesynopsis metafile="mod_userdir.xml.meta">

<name>mod_userdir</name>
<description>ユーザ専用のディレクトリを提供
  </description>
<status>Base</status>
<sourcefile>mod_userdir.c</sourcefile>
<identifier>userdir_module</identifier>

<summary>
<p>このモジュールは、
<code>http://example.com/~user/</code>
構文を使ってユーザ専用ディレクトリにアクセスできるようにします。</p>
</summary>

<seealso><a href="../urlmapping.html">URL から
ファイルシステムへのマッピング</a></seealso>
<seealso><a href="../howto/public_html.html">public_html
チュートリアル</a></seealso>

<directivesynopsis>

<name>UserDir</name>
<description>ユーザ専用ディレクトリの位置</description>
<syntax>UserDir <em>directory-filename</em></syntax>
<default>UserDir public_html</default>
<contextlist><context>server config</context>
<context>virtual host</context></contextlist>

<usage>

    <p><directive>UserDir</directive> ディレクティブは、
    ユーザのドキュメントへのリクエストを受けた時に使う
    ユーザのホームディレクトリ中の、実際のディレクトリを
    設定します。
    <em>directory-filename</em> には次のどれかを指定します:</p>

    <ul>
      <li>ディレクトリ名か下に示すようなパターン。</li>

      <li><code>disabled</code> キーワード。
      <code>enabled</code> キーワード (下記参照) で明示的に
      指定されたユーザ以外の
      <em>全ての</em>ユーザ名-ディレクトリ変換を
      しないようにします。</li>

      <li><code>disabled</code> キーワードと、スペース区切りのユーザ名リスト。
      このリスト中に含まれるユーザ名に対しては、たとえ
      <code>enabled</code> 節にあったとしても、
      <em>決して</em>ディレクトリ変換は行われません。</li>

      <li><code>enabled</code> キーワードとスペース区切りのユーザ名リスト。
      全体では変換が無効になっていたとしても、
      これらのユーザ名にはディレクトリ変換が行われます。
      ただし、<code>disabled</code> 節にもあれば変換はされません。
      </li>
    </ul>

    <p>もし <code>enabled</code> も <code>disabled</code>
    キーワードも <code>UserDir</code> に現われていなければ、
    引数はファイル名パターンとして扱われ、
    名前からディレクトリへの変換の指定を行なう時に使われます。
    <code>http://www.foo.com/~bob/one/two.html</code>
    へのリクエストは次のように変換されます:</p>

<table>
<tr><th>UserDir ディレクティブ</th>
<th>変換後のパス</th></tr>
<tr><td>UserDir public_html</td><td>~bob/public_html/one/two.html</td></tr>
<tr><td>UserDir /usr/web</td><td>/usr/web/bob/one/two.html</td></tr>
<tr><td>UserDir /home/*/www</td><td>/home/bob/www/one/two.html</td></tr>
</table>

    <p>次のディレクティブはクライアントに対してリダイレクトを
    送信します:</p>

<table>
<tr><th>UserDir ディレクティブ</th>
<th>変換後のパス</th></tr>
<tr><td>UserDir http://www.foo.com/users</td><td>http://www.foo.com/users/bob/one/two.html</td></tr>
<tr><td>UserDir
http://www.foo.com/*/usr</td><td>http://www.foo.com/bob/usr/one/two.html</td></tr>
<tr><td>UserDir
http://www.foo.com/~*/</td><td>http://www.foo.com/~bob/one/two.html</td></tr>
</table> 

<note>
      <strong>このディレクティブを使うときは注意してください;
      "<code>UserDir ./</code>" は
      "<code>/~root</code>" から "<code>/</code>" へマップしますが、
      これは望ましい動作ではないでしょう。
      "<code>UserDir disabled root</code>" 宣言を
      設定の中に含めておくことを強くお薦めします。
      追加情報に <directive module="core">Directory</directive>
      ディレクティブや
      <a href="../misc/security_tips.html">セキュリティ
      Tips</a> のページもご覧下さい。</strong>
</note>

<p>追加の例:</p>

<p>少数のユーザのみが <code>UserDir</code>
ディレクトリを利用し、それ以外には利用させたくない場合は
次を使いましょう:</p>

<example>
UserDir disabled<br />
UserDir enabled user1 user2 user3
</example>

<p>大部分のユーザは <code>UserDir</code> ディレクトリを利用するけれど、
少数の人は不許可にしたい場合は、次を使いましょう:</p>

<example>
UserDir enabled<br />
UserDir disabled user4 user5 user6
</example>

<p>他のユーザディレクトリを指定することもできます。
次のようなコマンドを使うと:</p>

<example>
Userdir public_html /usr/web http://www.foo.com/
</example>

<p>http://www.foo.com/~bob/one/two.html へのリクエストはまず
~bob/public_html/one/two.html のページを調べ、その次に
/usr/web/bob/one/two.html を調べ、最後に http://www.foo.com/bob/one/two.html
へのリダイレクトを送ります。</p>

<p>リダイレクトを加える場合は、リストの最後の選択肢でなければなりません。
Apache はリダイレクトが成功するかどうかを決めることはできませんので、
リストの前の方にリダイレクトを書くと、それが必ず使用される選択肢に
なってしまいます。</p>

</usage>

<seealso><a href="../howto/public_html.html">public_html
チュートリアル</a></seealso>

</directivesynopsis>
</modulesynopsis>