| <?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>ユーザ毎のウェブディレクトリ - Apache HTTP サーバ バージョン 2.4</title> |
| <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="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 id="manual-page"><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="./">How-To / チュートリアル</a></div><div id="page-content"><div id="preamble"><h1>ユーザ毎のウェブディレクトリ</h1> |
| <div class="toplang"> |
| <p><span>翻訳済み言語: </span><a href="../en/howto/public_html.html" hreflang="en" rel="alternate" title="English"> en </a> | |
| <a href="../es/howto/public_html.html" hreflang="es" rel="alternate" title="Español"> es </a> | |
| <a href="../fr/howto/public_html.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | |
| <a href="../ja/howto/public_html.html" title="Japanese"> ja </a> | |
| <a href="../ko/howto/public_html.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | |
| <a href="../tr/howto/public_html.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> |
| </div> |
| <div class="outofdate">この日本語訳はすでに古くなっている |
| 可能性があります。 |
| 最近更新された内容を見るには英語版をご覧下さい。 |
| </div> |
| |
| <p>複数のユーザのいるシステムでは、<code class="directive"><a href="../mod/mod_userdir.html#userdir">UserDir</a></code> ディレクティブを使って |
| 各ユーザがホームディレクトリにウェブサイトを構築できるように設定することが |
| 可能です。URL <code>http://example.com/~username/</code> を訪れた人は |
| "<code>username</code>" というユーザの <code class="directive"><a href="../mod/mod_userdir.html#userdir">UserDir</a></code> ディレクティブで指定された |
| サブディレクトリからコンテンツを得ることになります。</p> |
| |
| <p>in the default config file, and adapting the <code>httpd-userdir.conf</code> |
| file as necessary, or by including the appropriate directives in a |
| <code>Directory</code> block within the main config file.</p> |
| <p>デフォルトではこれらのディレクトリへのアクセスは<strong>許可されていません</strong>。 |
| <code class="directive"><a href="../mod/mod_userdir.html#userdir">UserDir</a></code> を使って有効にできます。 |
| 有効にするには、デフォルトの設定ファイルで付随する |
| <code>httpd-userdir.conf</code> ファイルが必要で、 |
| その中の次の行のコメントアウトを外して有効にするか、 |
| </p> |
| <div class="example"><p><code> |
| #Include conf/extra/httpd-userdir.conf |
| </code></p></div> |
| <p>あるいは、メインの設定ファイル中の <code>Directory</code> |
| ブロックの中に適切にディレクティブを記述しておきます。</p> |
| </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><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#related">ユーザ毎のウェブディレクトリ</a></li> |
| <li><img alt="" src="../images/down.gif" /> <a href="#userdir">UserDir を使ってファイルのパスを設定する</a></li> |
| <li><img alt="" src="../images/down.gif" /> <a href="#redirect">外部 URL にリダイレクトする</a></li> |
| <li><img alt="" src="../images/down.gif" /> <a href="#enable">この機能を使用できるユーザを制限する</a></li> |
| <li><img alt="" src="../images/down.gif" /> <a href="#cgi">ユーザ毎の CGI ディレクトリ</a></li> |
| <li><img alt="" src="../images/down.gif" /> <a href="#htaccess">ユーザによる設定変更を許可</a></li> |
| </ul><h3>参照</h3><ul class="seealso"><li><a href="../urlmapping.html">URL からファイルシステムへのマッピング</a></li><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="section"> |
| <h2><a name="related" id="related">ユーザ毎のウェブディレクトリ</a></h2> |
| |
| <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> |
| </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> |
| <div class="section"> |
| <h2><a name="userdir" id="userdir">UserDir を使ってファイルのパスを設定する</a></h2> |
| |
| |
| <p><code class="directive"><a href="../mod/mod_userdir.html#userdir">UserDir</a></code> ディレクティブは |
| ユーザ毎のコンテンツが読み込まれるディレクトリを指定します。 |
| このディレクティブはいろいろ違った形式を取ることができます。</p> |
| |
| <p>スラッシュで始まらないパスが与えられたときは、ユーザのホームディレクトリ |
| からの相対パスとみなされます。次の設定があったときに:</p> |
| |
| <pre class="prettyprint lang-config">UserDir public_html</pre> |
| |
| |
| <p>URL <code>http://example.com/~rbowen/file.html</code> は |
| パス <code>/home/rbowen/public_html/file.html</code> へ |
| 変換されます。</p> |
| |
| <p>パスがスラッシュで始まるときは、ディレクトリパスはそのパスに |
| ユーザ名を加えたものからなります。次の設定のとき:</p> |
| |
| <pre class="prettyprint lang-config">UserDir /var/html</pre> |
| |
| |
| <p>URL <code>http://example.com/~rbowen/file.html</code> は |
| パス <code>/var/html/rbowen/file.html</code> へ変換されます。</p> |
| |
| <p>アスタリスク (*) を含むパスが指定されたときは、アスタリスクを |
| ユーザ名で置換したものが使用されます。このような設定だと:</p> |
| |
| <pre class="prettyprint lang-config">UserDir /var/www/*/docs</pre> |
| |
| |
| <p>URL <code>http://example.com/~rbowen/file.html</code> は |
| パス <code>/var/www/rbowen/docs/file.html</code> へ変換されます。</p> |
| |
| <p>ディレクトリやディレクトリパスを複数設定することもできます。</p> |
| |
| <pre class="prettyprint lang-config">UserDir public_html /var/html</pre> |
| |
| |
| |
| <p><code>http://example.com/~rbowen/file.html</code> という |
| URL に対しては <code>~rbowen</code> を探します。見つからなければ、 |
| <code>/var/html</code> の下にある <code>rbowen</code> を探します。 |
| もし見つかれば上記の URL は <code>/var/html/rbowen/file.html</code> |
| というファイルパスに変換されます。</p> |
| |
| </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> |
| <div class="section"> |
| <h2><a name="redirect" id="redirect">外部 URL にリダイレクトする</a></h2> |
| |
| <p><code class="directive"><a href="../mod/mod_userdir.html#userdir">UserDir</a></code> |
| ディレクティブを使って外部 URL にリダイレクトすることもできます。</p> |
| |
| <pre class="prettyprint lang-config">UserDir http://example.org/users/*/</pre> |
| |
| |
| |
| <p>上記例では <code>http://example.com/~bob/abc.html</code> |
| へのリクエストは <code>http://example.org/users/bob/abc.html</code> |
| にリダイレクトされます。</p> |
| </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> |
| <div class="section"> |
| <h2><a name="enable" id="enable">この機能を使用できるユーザを制限する</a></h2> |
| |
| |
| <p>UserDir のドキュメントに示されている構文を使うことで、 |
| どのユーザがこの機能を使うことができるかを制限することができます:</p> |
| |
| <div class="example"><p><code> |
| UserDir enabled<br /> |
| UserDir disabled root jro fish |
| </code></p></div> |
| |
| <p>上の設定は <code>dissabled</code> 文のユーザ以外のすべてのユーザに |
| 対して UserDir の機能を有効にします。同様にして、以下のように |
| 数名のユーザ以外に対してこの機能を無効にすることもできます:</p> |
| |
| <pre class="prettyprint lang-config"> UserDir disabled<br /> |
| UserDir enabled rbowen krietz</pre> |
| |
| |
| <p>他の例は <code class="directive"><a href="../mod/mod_userdir.html#userdir">UserDir</a></code> |
| の説明を参照してください。</p> |
| |
| </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> |
| <div class="section"> |
| <h2><a name="cgi" id="cgi">ユーザ毎の CGI ディレクトリ</a></h2> |
| |
| |
| <p>それぞれのユーザに専用の cgi-bin ディレクトリを与えるために、 |
| <code class="directive"><a href="../mod/core.html#directory"><Directory></a></code> |
| を使ってユーザのホームディレクトリの指定された領域に対して CGI を有効に |
| することができます。</p> |
| |
| <pre class="prettyprint lang-config"><Directory /home/*/public_html/cgi-bin/> |
| Options ExecCGI |
| SetHandler cgi-script |
| </Directory></pre> |
| |
| |
| <p>そして、<code>UserDir</code> が |
| <code>public_html</code> に設定されていると仮定すると、 |
| そのディレクトリの CGI プログラム <code>example.cgi</code> |
| は以下の様に呼び出されることができます:</p> |
| |
| <div class="example"><p><code> |
| http://example.com/~rbowen/cgi-bin/example.cgi |
| </code></p></div> |
| |
| </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> |
| <div class="section"> |
| <h2><a name="htaccess" id="htaccess">ユーザによる設定変更を許可</a></h2> |
| |
| |
| <p>ユーザに彼らのウェブ空間でのサーバの設定の変更を許可する場合、 |
| ユーザは <code>.htaccess</code> ファイルを使って設定を変更する必要があります。 |
| <code class="directive"><a href="../mod/core.html#allowoverride">AllowOverride</a></code> の値を |
| ユーザが変更することを許可したいディレクティブに対して十分なものに |
| 設定していることを確認してください。この機能がどのようにして動作しているか |
| の詳細は <a href="htaccess.html">.htaccess チュートリアル</a> を読んで |
| ください。</p> |
| |
| </div></div> |
| <div class="bottomlang"> |
| <p><span>翻訳済み言語: </span><a href="../en/howto/public_html.html" hreflang="en" rel="alternate" title="English"> en </a> | |
| <a href="../es/howto/public_html.html" hreflang="es" rel="alternate" title="Español"> es </a> | |
| <a href="../fr/howto/public_html.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | |
| <a href="../ja/howto/public_html.html" title="Japanese"> ja </a> | |
| <a href="../ko/howto/public_html.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | |
| <a href="../tr/howto/public_html.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> |
| </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> |
| <script type="text/javascript"><!--//--><![CDATA[//><!-- |
| var comments_shortname = 'httpd'; |
| var comments_identifier = 'http://httpd.apache.org/docs/2.4/howto/public_html.html'; |
| (function(w, d) { |
| if (w.location.hostname.toLowerCase() == "httpd.apache.org") { |
| d.write('<div id="comments_thread"><\/div>'); |
| var s = d.createElement('script'); |
| s.type = 'text/javascript'; |
| s.async = true; |
| s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; |
| (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); |
| } |
| else { |
| d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); |
| } |
| })(window, document); |
| //--><!]]></script></div><div id="footer"> |
| <p class="apache">Copyright 2018 The Apache Software Foundation.<br />この文書は <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> のライセンスで提供されています。.</p> |
| <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[//><!-- |
| if (typeof(prettyPrint) !== 'undefined') { |
| prettyPrint(); |
| } |
| //--><!]]></script> |
| </body></html> |