mod_proxy.html.ja.utf8 90.8 KB
Newer Older
powelld's avatar
powelld committed
    (<code>RewriteRule ...  [P]</code>) と併せて使用することができます。</p>

    <p><code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code> セクションの中で使われた場合は、
    最初の引数は省略され、ローカルディレクトリは <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code> から取得されます。</p>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ProxyPassReverseCookieDomain" id="ProxyPassReverseCookieDomain">ProxyPassReverseCookieDomain</a> <a name="proxypassreversecookiedomain" id="proxypassreversecookiedomain">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>リバースプロキシサーバからの Set-Cookie ヘッダの Domain 文字列を
調整する</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ProxyPassReverseCookieDomain <var>internal-domain</var> <var>public-domain</var></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Extension</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_proxy</td></tr>
</table>
<p>使用法は基本的に
<code class="directive"><a href="#proxypassreverse">ProxyPassReverse</a></code> と同じですが、
ヘッダの URL の代わりに <code>Set-Cookie</code> ヘッダの
<code>domain</code> 文字列を書き換えます。</p>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ProxyPassReverseCookiePath" id="ProxyPassReverseCookiePath">ProxyPassReverseCookiePath</a> <a name="proxypassreversecookiepath" id="proxypassreversecookiepath">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Reverse プロキシサーバからの Set-Cookie ヘッダの Path 文字列を
調整する</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ProxyPassReverseCookiePath <var>internal-path</var> <var>public-path</var></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Extension</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_proxy</td></tr>
</table>
<p>使用法は基本的に
<code class="directive"><a href="#proxypassreverse">ProxyPassReverse</a></code> と同じですが、
ヘッダの URL の代わりに <code>Set-Cookie</code> ヘッダの
<code>path</code> 文字列を書き換えます。</p>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ProxyPreserveHost" id="ProxyPreserveHost">ProxyPreserveHost</a> <a name="proxypreservehost" id="proxypreservehost">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>プロキシリクエストに、受け付けた Host HTTP ヘッダを使う</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ProxyPreserveHost On|Off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>ProxyPreserveHost Off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Extension</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_proxy</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Apache 2.0.31 以降で使用可能</td></tr>
</table>
    <p>このオプションが有効になっている場合、<code class="directive">ProxyPass</code>
    で指定したホスト名の代わりに、受け付けたリクエストの Host: 行を
    プロキシ先のホストに送ります。</p>

    <p>このオプションは通常は <code>Off</code> に設定してください。
    ほとんどの場合、これは大量の名前ベースのバーチャルホスティングを行なっていて、
    元々の Host ヘッダをバックエンドサーバが解釈する必要のあるときのような、
    特別な設定が必要な場合にのみ有用です。</p>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ProxyReceiveBufferSize" id="ProxyReceiveBufferSize">ProxyReceiveBufferSize</a> <a name="proxyreceivebuffersize" id="proxyreceivebuffersize">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>プロキシされる HTTP と FTP 接続のためのネットワークバッファサイズ</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ProxyReceiveBufferSize <var>bytes</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>ProxyReceiveBufferSize 0</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Extension</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_proxy</td></tr>
</table>
    <p><code class="directive">ProxyReceiveBufferSize</code> ディレクティブは
    スループットを上げるために明示的に (TCP/IP) ネットワークバッファのサイズを
    設定します。値は <code>512</code> 以上か、システムのデフォルトのバッファ
    サイズを意味する <code>0</code> でなければなりません。</p>

    <div class="example"><h3></h3><p><code>
      ProxyReceiveBufferSize 2048
    </code></p></div>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ProxyRemote" id="ProxyRemote">ProxyRemote</a> <a name="proxyremote" id="proxyremote">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>特定のリクエストを扱う時に使われるリモートプロキシを指定する</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ProxyRemote <var>match</var> <var>remote-server</var></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Extension</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_proxy</td></tr>
</table>
    <p>このディレクティブはこのプロキシに対するリモートプロキシを定義します。
    <var>match</var> はリモートサーバがサポートする URL スキーム、
    リモートサーバが使うはずの URL の一部分、サーバがすべての
    リクエストに使われることを示す <code>*</code> のどれかになります。
    <var>remote-server</var> はリモートサーバの部分 URL です。構文:</p>

    <div class="example"><p><code>
      <dfn>remote-server</dfn> =
          <var>scheme</var>://<var>hostname</var>[:<var>port</var>]
    </code></p></div>

    <p><var>scheme</var> は実際上リモートサーバとの通信に使われるプロトコルを
    決定します。このモジュールでは <code>http</code> だけがサポートされて
    います。</p>

    <div class="example"><h3></h3><p><code>
      ProxyRemote http://goodguys.com/ http://mirrorguys.com:8000<br />
      ProxyRemote * http://cleversite.com<br />
      ProxyRemote ftp http://ftpproxy.mydomain.com:8080
    </code></p></div>

    <p>この例では、プロキシは FTP リクエストを別の HTTP リクエストで包んで
    そのようなリクエストを扱える別のプロキシに転送します。</p>

    <p>このオプションはリバースプロキシの設定もサポートします。
    サーバが別のフォワードプロキシの後ろに隠されている場合でも
    バックエンドウェブサーバをバーチャルホストの URL 空間に入れることが
    できます。</p>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ProxyRemoteMatch" id="ProxyRemoteMatch">ProxyRemoteMatch</a> <a name="proxyremotematch" id="proxyremotematch">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>正規表現でのマッチによるリクエストを扱うリモートプロキシの指定</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ProxyRemoteMatch <var>regex</var> <var>remote-server</var></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Extension</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_proxy</td></tr>
</table>
    <p><code class="directive">ProxyRemoteMatch</code> は最初の引数がリクエストされた
    URL にマッチする<a class="glossarylink" href="../glossary.html#regex" title="用語集を参照">正規表現</a>であることを除けば <code class="directive"><a href="#proxyremote">ProxyRemote</a></code> ディレクティブと同じです。</p>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ProxyRequests" id="ProxyRequests">ProxyRequests</a> <a name="proxyrequests" id="proxyrequests">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>フォワード (標準の) プロキシリクエストを有効にする</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ProxyRequests On|Off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>ProxyRequests Off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Extension</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_proxy</td></tr>
</table>
    <p>これは Apache のフォワードプロキシサーバとしての動作を
    有効もしくは無効にします。(ProxyRequests を <code>Off</code>
    設定しても、<code class="directive"><a href="#proxypass">ProxyPass</a></code> 
    の設定は無効になりません。)</p>

    <p>通常のリバースプロキシの設定では、このオプションは <code>Off</code>
    に設定してください。</p>

    <p>HTTP や FTP サイトへのプロキシの機能を有効にしたい場合は、
    <code class="module"><a href="../mod/mod_proxy_http.html">mod_proxy_http</a></code><code class="module"><a href="../mod/mod_proxy_ftp.html">mod_proxy_ftp</a></code>
    サーバに組み込まれていなければなりません。</p>

    <div class="warning"><h3>警告</h3>
      <p><a href="#access">サーバを安全にする</a>まで <code class="directive"><a href="#proxyrequests">ProxyRequests</a></code> は有効にしないでください。
      オープンプロキシサーバはあなた自身のネットワークにとっても、
      インターネット全体にとっても危険です。</p>
    </div>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ProxySet" id="ProxySet">ProxySet</a> <a name="proxyset" id="proxyset">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Set various Proxy balancer or member parameters</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code /></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>ディレクトリ</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Extension</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_proxy</td></tr>
</table><p>Documentation not yet translated. Please see English version of document.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ProxySourceAddress" id="ProxySourceAddress">ProxySourceAddress</a> <a name="proxysourceaddress" id="proxysourceaddress">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Set local IP address for outgoing proxy connections</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ProxySourceAddress <var>address</var></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Extension</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_proxy</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available in version 2.3.9 and later</td></tr>
</table><p>このディレクティブの解説文書は
            まだ翻訳されていません。英語版をご覧ください。
            </p></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ProxyStatus" id="ProxyStatus">ProxyStatus</a> <a name="proxystatus" id="proxystatus">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Show Proxy LoadBalancer status in mod_status</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code /></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Extension</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_proxy</td></tr>
</table><p>Documentation not yet translated. Please see English version of document.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ProxyTimeout" id="ProxyTimeout">ProxyTimeout</a> <a name="proxytimeout" id="proxytimeout">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>プロキシされたリクエストのネットワークタイムアウト</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ProxyTimeout <var>seconds</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>ProxyTimeout 300</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Extension</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_proxy</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Apache 2.0.31 以降で使用可能</td></tr>
</table>
    <p>このディレクティブはユーザがプロキシリクエストのタイムアウトを
    指定できるようにします。これはハングしてしまう遅い、もしくは挙動の
    怪しいサーバがあり、サーバがデータを返すまでひたすら待ち続けるよりも
    タイムアウトを返してより緩やかに<span class="transnote">(<em>訳注:</em> graceful に)</span>
    失敗させたい場合に役に立ちます。</p>

</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ProxyVia" id="ProxyVia">ProxyVia</a> <a name="proxyvia" id="proxyvia">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>プロキシされたリクエストの <code>Via</code> HTTP 応答ヘッダ
により提供される情報</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>ProxyVia On|Off|Full|Block</code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>ProxyVia Off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Extension</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_proxy</td></tr>
</table>
    <p>このディレクティブはプロキシの <code>Via:</code> HTTP ヘッダの使用を
    制御します。想定されている使い方は、プロキシサーバがいくつも繋がっているときに
    プロキシリクエストの流れを制御することです。<code>Via:</code> ヘッダ行の
    説明は <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a> (HTTP/1.1)
    の 14.45 節を読んでください。</p>

    <ul>
    <li>デフォルトの <code>Off</code> に設定されていると、特別な処理は
    行なわれません。リクエストやリプライに <code>Via:</code> ヘッダがあれば、
    変更されずにそのまま渡します。</li>

    <li><code>On</code> に設定されていれば、各リクエストとリプライに
    <code>Via:</code> 行が追加されます。</li>

    <li><code>Full</code> に設定されていれば、<code>Via:</code> ヘッダは
    コメント部分に Apache サーバのバージョンも含むようになります。</li>

    <li><code>Block</code> に設定されていれば、すべてのプロキシリクエストから
    <code>Via:</code> ヘッダが取り除かれます。新たに <code>Via:</code>
    生成されることはありません。</li>
    </ul>

</div>
</div>
<div class="bottomlang">
<p><span>翻訳済み言語: </span><a href="../en/mod/mod_proxy.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
<a href="../fr/mod/mod_proxy.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
<a href="../ja/mod/mod_proxy.html" title="Japanese">&nbsp;ja&nbsp;</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&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>
<script type="text/javascript"><!--//--><![CDATA[//><!--
var comments_shortname = 'httpd';
var comments_identifier = 'http://httpd.apache.org/docs/2.4/mod/mod_proxy.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 2017 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>