mirror of
https://github.com/apache/httpd.git
synced 2025-07-29 09:01:18 +03:00
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@703336 13f79535-47bb-0310-9956-ffa450edef68
171 lines
6.9 KiB
XML
171 lines
6.9 KiB
XML
<?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: 657842:698483 (outdated) -->
|
|
|
|
<!--
|
|
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> [<em>directory-filename</em>] ...</syntax>
|
|
<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>enebled</code> キーワードとスペース区切りのユーザ名リスト。
|
|
全体では変換が無効になっていたといたとしても、
|
|
これらのユーザ名にはディレクトリ変換が行われます。
|
|
ただし、<code>disabled</code> 節にもあれば変換はされません。
|
|
</li>
|
|
</ul>
|
|
|
|
<p>もし <code>enabled</code> も <code>disabled</code>
|
|
キーワードも <code>UserDir</code> に現われていなければ、
|
|
引数はファイル名パターンとして扱われ、
|
|
名前からディレクトリへの変換の指定を行なう時に使われます。
|
|
<code>http://www.example.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.example.com/users</td><td>http://www.example.com/users/bob/one/two.html</td></tr>
|
|
<tr><td>UserDir
|
|
http://www.example.com/*/usr</td><td>http://www.example.com/bob/usr/one/two.html</td></tr>
|
|
<tr><td>UserDir
|
|
http://www.example.com/~*/</td><td>http://www.example.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.example.com/
|
|
</example>
|
|
|
|
<p>http://www.example.com/~bob/one/two.html へのリクエストはまず
|
|
~bob/public_html/one/two.html のページを調べ、その次に
|
|
/usr/web/bob/one/two.html を調べ、最後に http://www.example.com/bob/one/two.html
|
|
へのリダイレクトを送ります。</p>
|
|
|
|
<p>リダイレクトを加える場合は、リストの最後の選択肢でなければなりません。
|
|
Apache はリダイレクトが成功するかどうかを決めることはできませんので、
|
|
リストの前の方にリダイレクトを書くと、それが必ず使用される選択肢に
|
|
なってしまいます。</p>
|
|
|
|
<p>2.1.4 以降では、ユーザディレクトリ置換機能はデフォルトでは起動しません。
|
|
それ以前のバージョンでは、<directive module="mod_userdir">UserDir</directive>
|
|
ディレクティブが存在しなければ、<code>UserDir public_html</code>
|
|
であると仮定されていました。</p>
|
|
|
|
</usage>
|
|
|
|
<seealso><a href="../howto/public_html.html">public_html
|
|
チュートリアル</a></seealso>
|
|
|
|
</directivesynopsis>
|
|
</modulesynopsis>
|
|
|
|
|