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 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 5 This file is generated from xml source: DO NOT EDIT 6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 7 --> 8<title>mod_proxy_ftp - Apache HTTP サーバ</title> 9<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> 10<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> 11<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" /> 12<script src="/style/scripts/prettify.js" type="text/javascript"> 13</script> 14 15<link href="/images/favicon.ico" rel="shortcut icon" /></head> 16<body> 17<div id="page-header"> 18<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> 19<p class="apache">Apache HTTP サーバ バージョン 2.2</p> 20<img alt="" src="/images/feather.gif" /></div> 21<div class="up"><a href="./"><img title="<-" alt="<-" src="/images/left.gif" /></a></div> 22<div id="path"> 23<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> > <a href="./">モジュール</a></div> 24<div id="page-content"> 25<div id="preamble"><h1>Apache モジュール mod_proxy_ftp</h1> 26<div class="toplang"> 27<p><span>翻訳済み言語: </span><a href="/en/mod/mod_proxy_ftp.html" hreflang="en" rel="alternate" title="English"> en </a> | 28<a href="/ja/mod/mod_proxy_ftp.html" title="Japanese"> ja </a></p> 29</div> 30<div class="outofdate">この日本語訳はすでに古くなっている 31 可能性があります。 32 最近更新された内容を見るには英語版をご覧下さい。 33 </div> 34<table class="module"><tr><th><a href="module-dict.html#Description">説明:</a></th><td><code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code> のための FTP サポートモジュール</td></tr> 35<tr><th><a href="module-dict.html#Status">ステータス:</a></th><td>Extension</td></tr> 36<tr><th><a href="module-dict.html#ModuleIdentifier">モジュール識別子:</a></th><td>proxy_ftp_module</td></tr> 37<tr><th><a href="module-dict.html#SourceFile">ソースファイル:</a></th><td>mod_proxy_ftp.c</td></tr></table> 38<h3>概要</h3> 39 40 <p>本モジュールには <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code> が<em>必要です</em>。 41 本モジュールは FTP サイトへのプロキシ機能を提供します。 42 現状、 FTP サポートは GET メソッドに限定されていることに注意してください。</p> 43 44 <p>FTP プロキシリクエストを扱うためには、<code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code> 45 と <code class="module"><a href="/mod/mod_proxy_ftp.html">mod_proxy_ftp</a></code>が サーバに組み込まれて 46 いなければいけません。</p> 47 48 <div class="warning"><h3>警告</h3> 49 <p><a href="mod_proxy.html#access"> 50 安全なサーバにする</a>までプロキシ機能は有効にしないでください。 51 オープンプロキシサーバはあなた自身のネットワークにとっても、 52 インターネット全体にとっても危険です。</p> 53 </div> 54</div> 55<div id="quickview"><h3 class="directives">ディレクティブ</h3> 56<p>このモジュールにディレクティブはありません。</p> 57<h3>トピック</h3> 58<ul id="topics"> 59<li><img alt="" src="/images/down.gif" /> <a href="#mimetypes">なぜファイルタイプ <var>xxx</var> 60 は FTP ダウンロードできないのでしょう?</a></li> 61<li><img alt="" src="/images/down.gif" /> <a href="#type">ファイル <var>xxx</var> を ASCII モードで 62 FTP ダウンロードさせるにはどうすればいいのでしょう?</a></li> 63<li><img alt="" src="/images/down.gif" /> <a href="#ftpnonget">FTP アップロードはできますか?</a></li> 64<li><img alt="" src="/images/down.gif" /> <a href="#percent2fhck">ホームディレクトリ外のファイルに FTP 65 アクセスするにはどうすればよいでしょうか?</a></li> 66<li><img alt="" src="/images/down.gif" /> <a href="#ftppass">ブラウザの URL 欄に FTP のパスワードがそのまま 67 載らないようにするにはどうすればよいでしょうか?</a></li> 68</ul><h3>参照</h3> 69<ul class="seealso"> 70<li><code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code></li> 71</ul><ul class="seealso"><li><a href="#comments_section">コメント</a></li></ul></div> 72<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 73<div class="section"> 74<h2><a name="mimetypes" id="mimetypes">なぜファイルタイプ <var>xxx</var> 75 は FTP ダウンロードできないのでしょう?</a></h2> 76 <p>おそらく、プロキシの mime.types 設定ファイルでそのファイルタイプを 77 <code>application/octet-stream</code> として定義していないのでしょう。 78 以下の行が便利でしょう。</p> 79 80 <div class="example"><pre>application/octet-stream bin dms lha lzh exe class tgz taz</pre></div> 81 <p>デフォルトで全てをバイナリにするのもいいかもしれません:</p> 82 <div class="example"><pre>DefaultType application/octet-stream</pre></div> 83 </div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 84<div class="section"> 85<h2><a name="type" id="type">ファイル <var>xxx</var> を ASCII モードで 86 FTP ダウンロードさせるにはどうすればいいのでしょう?</a></h2> 87 <p>稀に、特定のファイルを FTP の <code>ASCII</code> 転送モードでダウンロードしなければ 88 ならない場合があります (なお、デフォルトの転送モードは <code>binary</code> です)。 89 この場合、リクエストの末尾に <code>;type=a</code> を加えることで 90 <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code> のデフォルト動作を変更して、 ASCII 転送モードにできます。 91 (一方、 FTP のディレクトリ一覧は常に ASCII モードです。)</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="ftpnonget" id="ftpnonget">FTP アップロードはできますか?</a></h2> 95 <p>現状、 mod_proxy は FTP の GET のみサポートしています。 96 もちろん、 Apache プロキシで HTTP アップロード (POST または PUT) 97 はできます。</p> 98 </div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 99<div class="section"> 100<h2><a name="percent2fhck" id="percent2fhck">ホームディレクトリ外のファイルに FTP 101 アクセスするにはどうすればよいでしょうか?</a></h2> 102 <p>FTP の URI はログイン中のユーザのホームディレクトリの相対パスとして 103 解釈されます。より上位のディレクトリに行くために /../ を使っても無駄です。 104 と言うのも、ドットふたつはブラウザが解釈するだけで、実際に FTP サーバには 105 送られないからです。この問題に対して、 Apache の FTP プロキシは 106 いわゆる <dfn>Squid %2f hack</dfn> を実装しています; 107 <a href="http://www.squid-cache.org/">Squid Proxy Cache</a> などの 108 他の有名なプロキシサーバも採用している解決方法です。 109 リクエストのパスの先頭に <code>/%2f</code> をつけると、これらのプロキシ 110 は FTP のディレクトリを <code>/</code> 開始にします (ホームディレクトリではなく)。 111 例えば、<code>/etc/motd</code> ファイルを取得するには、次の URL を 112 使えばよいでしょう:</p> 113 114 <div class="example"><p><code> 115 ftp://<var>user</var>@<var>host</var>/%2f/etc/motd 116 </code></p></div> 117 </div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 118<div class="section"> 119<h2><a name="ftppass" id="ftppass">ブラウザの URL 欄に FTP のパスワードがそのまま 120 載らないようにするにはどうすればよいでしょうか?</a></h2> 121 <p>FTP サーバにユーザ名とパスワードを使ってログインするために、 Apache 122 は異なる戦略を使います。 URL にユーザ名もパスワードも無ければ、 Apache 123 は FTP サーバに匿名 (anonymous) ログインしようとします。 124 <em>例</em></p> 125 126 <div class="example"><p><code> 127 user: anonymous<br /> 128 password: apache_proxy@ 129 </code></p></div> 130 131 <p>匿名アクセスを設定したすべての有名な FTP サーバでこれは動作します。</p> 132 133 <p>特定のユーザ名でログインするために、 URL に次のようにユーザ名を埋め込めます:</p> 134 135 <div class="example"><p><code> 136 ftp://<var>username</var>@<var>host</var>/myfile 137 </code></p></div> 138 139 <p>FTP サーバがこのユーザ名に対してパスワードを求めると (そうあるべきです) 、 140 Apache は <code>401</code> (Authorization required) レスポンスを返します。 141 これによりブラウザはユーザ名とパスワードを求めるダイアログ画面をポップアップします。 142 パスワードを入力すると、もう一度接続しなおし、認証が成功すると、 143 要求していたリソースが現れます。このやりとりの利点は、ブラウザがパスワードを 144 そのまま表示しないことです。もし最初に次の URL を使っていると</p> 145 146 <div class="example"><p><code> 147 ftp://<var>username</var>:<var>password</var>@<var>host</var>/myfile 148 </code></p></div> 149 150 <p>パスワードがそのまま見えてしまいます。</p> 151 152 <div class="note"><h3>注意</h3> 153 <p>このように送信するパスワードはネットワーク上は暗号化されません。 154 ブラウザと Apache プロキシサーバの間は base64 エンコードした生パスワードで、 155 Apache プロキシサーバと FTP サーバの間はプレインテキストです。 156 このため、 HTTP 経由で FTP サーバにアクセスする時 (とにかく FTP で個人的な 157 ファイルにアクセスする時 ) 、倍の慎重さが求められます。 158 安全でないネットワークを使っている場合、経路上でパスワードを盗み取られる 159 可能性があります。</p> 160 </div> 161 </div> 162</div> 163<div class="bottomlang"> 164<p><span>翻訳済み言語: </span><a href="/en/mod/mod_proxy_ftp.html" hreflang="en" rel="alternate" title="English"> en </a> | 165<a href="/ja/mod/mod_proxy_ftp.html" title="Japanese"> ja </a></p> 166</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> 167<script type="text/javascript"><!--//--><![CDATA[//><!-- 168var comments_shortname = 'httpd'; 169var comments_identifier = 'http://httpd.apache.org/docs/2.2/mod/mod_proxy_ftp.html'; 170(function(w, d) { 171 if (w.location.hostname.toLowerCase() == "httpd.apache.org") { 172 d.write('<div id="comments_thread"><\/div>'); 173 var s = d.createElement('script'); 174 s.type = 'text/javascript'; 175 s.async = true; 176 s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; 177 (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); 178 } 179 else { 180 d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); 181 } 182})(window, document); 183//--><!]]></script></div><div id="footer"> 184<p class="apache">Copyright 2013 The Apache Software Foundation.<br />この文書は <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> のライセンスで提供されています。.</p> 185<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[//><!-- 186if (typeof(prettyPrint) !== 'undefined') { 187 prettyPrint(); 188} 189//--><!]]></script> 190</body></html>