mod_proxy.html.en revision bd2e9d70c646eda4a7dd3f565ec329312f397380
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
75da45714b471969a6eb41b469237d51d1ed92beMark Craig XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
75da45714b471969a6eb41b469237d51d1ed92beMark Craig This file is generated from xml source: DO NOT EDIT
75da45714b471969a6eb41b469237d51d1ed92beMark Craig XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<link href="/images/favicon.ico" rel="shortcut icon" /></head>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<p class="apache">Apache HTTP Server Version 2.3</p>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<div class="up"><a href="./"><img title="<-" alt="<-" src="/images/left.gif" /></a></div>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.3</a> > <a href="./">Modules</a></div>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<div id="preamble"><h1>Apache Module mod_proxy</h1>
1c39f25b4e11ae0397f825f3d031bd01983b98f0Bruno Lavit<p><span>Available Languages: </span><a href="/en/mod/mod_proxy.html" title="English"> en </a> |
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<a href="/ja/mod/mod_proxy.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a></p>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>HTTP/1.1 proxy/gateway server</td></tr>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<tr><th><a href="module-dict.html#ModuleIdentifier">Module�Identifier:</a></th><td>proxy_module</td></tr>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<tr><th><a href="module-dict.html#SourceFile">Source�File:</a></th><td>mod_proxy.c</td></tr></table>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig <p>Do not enable proxying with <code class="directive"><a href="#proxyrequests">ProxyRequests</a></code> until you have <a href="#access">secured your server</a>. Open proxy servers are dangerous both to your
75da45714b471969a6eb41b469237d51d1ed92beMark Craig network and to the Internet at large.</p>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig <p>This module implements a proxy/gateway for Apache. It implements
75da45714b471969a6eb41b469237d51d1ed92beMark Craig proxying capability for <code>AJP13</code> (Apache JServe Protocol
75da45714b471969a6eb41b469237d51d1ed92beMark Craig version 1.3), <code>FTP</code>, <code>CONNECT</code> (for SSL),
75da45714b471969a6eb41b469237d51d1ed92beMark Craig <code>HTTP/0.9</code>, <code>HTTP/1.0</code>, and <code>HTTP/1.1</code>.
75da45714b471969a6eb41b469237d51d1ed92beMark Craig The module can be configured to connect to other proxy modules for these
75da45714b471969a6eb41b469237d51d1ed92beMark Craig and other protocols.</p>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig <p>Apache's proxy features are divided into several modules in
75da45714b471969a6eb41b469237d51d1ed92beMark Craig addition to <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code>:
75da45714b471969a6eb41b469237d51d1ed92beMark Craig <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>,
75da45714b471969a6eb41b469237d51d1ed92beMark Craig <code class="module"><a href="/mod/mod_proxy_ajp.html">mod_proxy_ajp</a></code>, <code class="module"><a href="/mod/mod_proxy_balancer.html">mod_proxy_balancer</a></code>,
75da45714b471969a6eb41b469237d51d1ed92beMark Craig and <code class="module"><a href="/mod/mod_proxy_connect.html">mod_proxy_connect</a></code>. Thus, if you want to use
75da45714b471969a6eb41b469237d51d1ed92beMark Craig one or more of the particular proxy functions, load
75da45714b471969a6eb41b469237d51d1ed92beMark Craig <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code> <em>and</em> the appropriate module(s)
75da45714b471969a6eb41b469237d51d1ed92beMark Craig into the server (either statically at compile-time or dynamically
75da45714b471969a6eb41b469237d51d1ed92beMark Craig via the <code class="directive"><a href="/mod/mod_so.html#loadmodule">LoadModule</a></code>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig directive).</p>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig <p>In addition, extended features are provided by other modules.
75da45714b471969a6eb41b469237d51d1ed92beMark Craig Caching is provided by <code class="module"><a href="/mod/mod_cache.html">mod_cache</a></code> and related
75da45714b471969a6eb41b469237d51d1ed92beMark Craig modules. The ability to contact remote servers using the SSL/TLS
75da45714b471969a6eb41b469237d51d1ed92beMark Craig protocol is provided by the <code>SSLProxy*</code> directives of
75da45714b471969a6eb41b469237d51d1ed92beMark Craig <code class="module"><a href="/mod/mod_ssl.html">mod_ssl</a></code>. These additional modules will need
75da45714b471969a6eb41b469237d51d1ed92beMark Craig to be loaded and configured to take advantage of these features.</p>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<div id="quickview"><h3 class="directives">Directives</h3>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#allowconnect">AllowCONNECT</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#balancermember">BalancerMember</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#noproxy">NoProxy</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#proxy"><Proxy></a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#proxybadheader">ProxyBadHeader</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#proxyblock">ProxyBlock</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#proxydomain">ProxyDomain</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#proxyerroroverride">ProxyErrorOverride</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#proxyftpdircharset">ProxyFtpDirCharset</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#proxyiobuffersize">ProxyIOBufferSize</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#proxymatch"><ProxyMatch></a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#proxymaxforwards">ProxyMaxForwards</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#proxypass">ProxyPass</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#proxypassinterpolateenv">ProxyPassInterpolateEnv</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#proxypassmatch">ProxyPassMatch</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#proxypassreverse">ProxyPassReverse</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#proxypassreversecookiedomain">ProxyPassReverseCookieDomain</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#proxypassreversecookiepath">ProxyPassReverseCookiePath</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#proxypreservehost">ProxyPreserveHost</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#proxyreceivebuffersize">ProxyReceiveBufferSize</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#proxyremote">ProxyRemote</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#proxyremotematch">ProxyRemoteMatch</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#proxyrequests">ProxyRequests</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#proxyset">ProxySet</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#proxystatus">ProxyStatus</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#proxytimeout">ProxyTimeout</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#proxyvia">ProxyVia</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#forwardreverse">Forward Proxies and Reverse
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#examples">Basic Examples</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#access">Controlling access to your proxy</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#startup">Slow Startup</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#intranet">Intranet Proxy</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#envsettings">Protocol Adjustments</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#request-bodies">Request Bodies</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><img alt="" src="/images/down.gif" /> <a href="#x-headers">Reverse Proxy Request Headers</a></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><code class="module"><a href="/mod/mod_cache.html">mod_cache</a></code></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><code class="module"><a href="/mod/mod_proxy_http.html">mod_proxy_http</a></code></li>
7bf512aea50c834dc9c3ef5a0a228059fcc753a5jenkins<li><code class="module"><a href="/mod/mod_proxy_ftp.html">mod_proxy_ftp</a></code></li>
7bf512aea50c834dc9c3ef5a0a228059fcc753a5jenkins<li><code class="module"><a href="/mod/mod_proxy_connect.html">mod_proxy_connect</a></code></li>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<li><code class="module"><a href="/mod/mod_proxy_balancer.html">mod_proxy_balancer</a></code></li>
7bf512aea50c834dc9c3ef5a0a228059fcc753a5jenkins<li><code class="module"><a href="/mod/mod_ssl.html">mod_ssl</a></code></li>
7bf512aea50c834dc9c3ef5a0a228059fcc753a5jenkins<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig<h2><a name="forwardreverse" id="forwardreverse">Forward Proxies and Reverse
75da45714b471969a6eb41b469237d51d1ed92beMark Craig <p>Apache can be configured in both a <dfn>forward</dfn> and
75da45714b471969a6eb41b469237d51d1ed92beMark Craig <dfn>reverse</dfn> proxy (also known as <dfn>gateway</dfn>) mode.</p>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig <p>An ordinary <dfn>forward proxy</dfn> is an intermediate
75da45714b471969a6eb41b469237d51d1ed92beMark Craig server that sits between the client and the <em>origin
75da45714b471969a6eb41b469237d51d1ed92beMark Craig server</em>. In order to get content from the origin server,
75da45714b471969a6eb41b469237d51d1ed92beMark Craig the client sends a request to the proxy naming the origin server
75da45714b471969a6eb41b469237d51d1ed92beMark Craig as the target and the proxy then requests the content from the
75da45714b471969a6eb41b469237d51d1ed92beMark Craig origin server and returns it to the client. The client must be
75da45714b471969a6eb41b469237d51d1ed92beMark Craig specially configured to use the forward proxy to access other
75da45714b471969a6eb41b469237d51d1ed92beMark Craig <p>A typical usage of a forward proxy is to provide Internet
75da45714b471969a6eb41b469237d51d1ed92beMark Craig access to internal clients that are otherwise restricted by a
75da45714b471969a6eb41b469237d51d1ed92beMark Craig firewall. The forward proxy can also use caching (as provided
75da45714b471969a6eb41b469237d51d1ed92beMark Craig by <code class="module"><a href="/mod/mod_cache.html">mod_cache</a></code>) to reduce network usage.</p>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig <p>The forward proxy is activated using the <code class="directive"><a href="#proxyrequests">ProxyRequests</a></code> directive. Because
75da45714b471969a6eb41b469237d51d1ed92beMark Craig forward proxies allow clients to access arbitrary sites through
75da45714b471969a6eb41b469237d51d1ed92beMark Craig your server and to hide their true origin, it is essential that
75da45714b471969a6eb41b469237d51d1ed92beMark Craig you <a href="#access">secure your server</a> so that only
75da45714b471969a6eb41b469237d51d1ed92beMark Craig authorized clients can access the proxy before activating a
75da45714b471969a6eb41b469237d51d1ed92beMark Craig forward proxy.</p>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig <p>A <dfn>reverse proxy</dfn> (or <dfn>gateway</dfn>), by
75da45714b471969a6eb41b469237d51d1ed92beMark Craig contrast, appears to the client just like an ordinary web
75da45714b471969a6eb41b469237d51d1ed92beMark Craig server. No special configuration on the client is necessary.
75da45714b471969a6eb41b469237d51d1ed92beMark Craig The client makes ordinary requests for content in the name-space
75da45714b471969a6eb41b469237d51d1ed92beMark Craig of the reverse proxy. The reverse proxy then decides where to
75da45714b471969a6eb41b469237d51d1ed92beMark Craig send those requests, and returns the content as if it was itself
75da45714b471969a6eb41b469237d51d1ed92beMark Craig the origin.</p>
75da45714b471969a6eb41b469237d51d1ed92beMark Craig <p>A typical usage of a reverse proxy is to provide Internet
75da45714b471969a6eb41b469237d51d1ed92beMark Craig users access to a server that is behind a firewall. Reverse
<p>A reverse proxy is activated using the <code class="directive"><a href="#proxypass">ProxyPass</a></code> directive or the
<code>[P]</code> flag to the <code class="directive"><a href="/mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> directive. It is
<strong>not</strong> necessary to turn <code class="directive"><a href="#proxyrequests">ProxyRequests</a></code> on in order to
ProxyPassReverse /foo http://foo.example.com/bar
<p>You can control who can access your proxy via the <code class="directive"><a href="#proxy"><Proxy></a></code> control block as in
forward proxy (using the <code class="directive"><a href="#proxyrequests">ProxyRequests</a></code> directive).
When using a reverse proxy (using the <code class="directive"><a href="#proxypass">ProxyPass</a></code> directive with
<p><strong>See Also</strong> the <a href="mod_proxy_http.html#env">Proxy-Chain-Auth</a> environment variable.</p>
<p>If you're using the <code class="directive"><a href="#proxyblock">ProxyBlock</a></code> directive, hostnames' IP addresses are looked up
WWW requests, thus requesting "http://somehost/" instead of
configured local domain. When the <code class="directive"><a href="#proxydomain">ProxyDomain</a></code> directive is used and the server is <a href="#proxyrequests">configured for proxy service</a>, Apache can return
<p>For circumstances where <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code> is sending
keepalives or HTTP/1.1, there are two <a href="/env.html">environment variables</a> that can force the
requests on to the origin server, <code class="module"><a href="/mod/mod_proxy_http.html">mod_proxy_http</a></code>
request. You can control this selection using <a href="/env.html">environment variables</a>. Setting
<p>When acting in a reverse-proxy mode (using the <code class="directive"><a href="#proxypass">ProxyPass</a></code> directive, for example),
<code class="module"><a href="/mod/mod_proxy_http.html">mod_proxy_http</a></code> adds several request headers in
<p>See also the <code class="directive"><a href="#proxypreservehost">ProxyPreserveHost</a></code> and <code class="directive"><a href="#proxyvia">ProxyVia</a></code> directives, which control
<div class="directive-section"><h2><a name="AllowCONNECT" id="AllowCONNECT">AllowCONNECT</a> <a name="allowconnect" id="allowconnect">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Ports that are allowed to <code>CONNECT</code> through the
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>AllowCONNECT <var>port</var> [<var>port</var>] ...</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>AllowCONNECT 443 563</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<p>Note that you'll need to have <code class="module"><a href="/mod/mod_proxy_connect.html">mod_proxy_connect</a></code> present
<div class="directive-section"><h2><a name="BalancerMember" id="BalancerMember">BalancerMember</a> <a name="balancermember" id="balancermember">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Add a member to a load balancing group</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>BalancerMember <var>url</var> [<var>key=value [key=value ...]]</var></code></td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>BalancerMember is only available in Apache 2.2
<p>One additional parameter is available only to <code class="directive"><a href="#balancermember">BalancerMember</a></code> directives:
<div class="directive-section"><h2><a name="NoProxy" id="NoProxy">NoProxy</a> <a name="noproxy" id="noproxy">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Hosts, domains, or networks that will be connected to
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>NoProxy <var>host</var> [<var>host</var>] ...</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
.com .apache.org.
<p>To distinguish <var>Domain</var>s from <var><a href="#hostname">Hostname</a></var>s (both syntactically and semantically; a DNS domain can
<p>In many situations, it is more effective to specify an <var><a href="#ipaddr">IPAddr</a></var> in place of a <var>Hostname</var> since a
<div class="directive-section"><h2><a name="Proxy" id="Proxy"><Proxy></a> <a name="proxy" id="proxy">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Container for directives applied to proxied resources</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><Proxy <var>wildcard-url</var>> ...</Proxy></code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<div class="directive-section"><h2><a name="ProxyBadHeader" id="ProxyBadHeader">ProxyBadHeader</a> <a name="proxybadheader" id="proxybadheader">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines how to handle bad header lines in a
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyBadHeader IsError|Ignore|StartBody</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProxyBadHeader IsError</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.0.44 and later</td></tr>
behaviour of <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code> if it receives syntactically invalid
<div class="directive-section"><h2><a name="ProxyBlock" id="ProxyBlock">ProxyBlock</a> <a name="proxyblock" id="proxyblock">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Words, hosts, or domains that are banned from being
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyBlock *|<var>word</var>|<var>host</var>|<var>domain</var>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<div class="directive-section"><h2><a name="ProxyDomain" id="ProxyDomain">ProxyDomain</a> <a name="proxydomain" id="proxydomain">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Default domain name for proxied requests</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyDomain <var>Domain</var></code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
ProxyDomain .example.com
<div class="directive-section"><h2><a name="ProxyErrorOverride" id="ProxyErrorOverride">ProxyErrorOverride</a> <a name="proxyerroroverride" id="proxyerroroverride">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Override error pages for proxied content</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyErrorOverride On|Off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProxyErrorOverride Off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.0 and later</td></tr>
<div class="directive-section"><h2><a name="ProxyFtpDirCharset" id="ProxyFtpDirCharset">ProxyFtpDirCharset</a> <a name="proxyftpdircharset" id="proxyftpdircharset">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Define the character set for proxied FTP listings</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyFtpDirCharset <var>character set</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProxyFtpDirCharset ISO-8859-1</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.2.7 and later</td></tr>
<div class="directive-section"><h2><a name="ProxyIOBufferSize" id="ProxyIOBufferSize">ProxyIOBufferSize</a> <a name="proxyiobuffersize" id="proxyiobuffersize">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determine size of internal data throughput buffer</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyIOBufferSize <var>bytes</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProxyIOBufferSize 8192</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<div class="directive-section"><h2><a name="ProxyMatch" id="ProxyMatch"><ProxyMatch></a> <a name="proxymatch" id="proxymatch">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Container for directives applied to regular-expression-matched
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code><ProxyMatch <var>regex</var>> ...</ProxyMatch></code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
identical to the <code class="directive"><a href="#proxy"><Proxy></a></code> directive, except it matches URLs
using <a class="glossarylink" href="/glossary.html#regex" title="see glossary">regular expressions</a>.</p>
<div class="directive-section"><h2><a name="ProxyMaxForwards" id="ProxyMaxForwards">ProxyMaxForwards</a> <a name="proxymaxforwards" id="proxymaxforwards">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximium number of proxies that a request can be forwarded
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyMaxForwards <var>number</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProxyMaxForwards -1</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.0 and later;
<div class="directive-section"><h2><a name="ProxyPass" id="ProxyPass">ProxyPass</a> <a name="proxypass" id="proxypass">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maps remote servers into the local server URL-space</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyPass [<var>path</var>] !|<var>url</var> [<var>key=value</var>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
<div class="warning">The <code class="directive"><a href="#proxyrequests">ProxyRequests</a></code> directive should
ProxyPass /example http://backend.example.com smax=5 max=20 ttl=120 retry=300
parameters can be add to this virtual worker. See <code class="module"><a href="/mod/mod_proxy_balancer.html">mod_proxy_balancer</a></code>
so you may still have to resort to <code class="module"><a href="/mod/mod_rewrite.html">mod_rewrite</a></code>
<p>When used inside a <code class="directive"><a href="/mod/core.html#location"><Location></a></code> section, the first argument is omitted and the local
directory is obtained from the <code class="directive"><a href="/mod/core.html#location"><Location></a></code>.</p>
<code class="directive"><a href="/mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> directive with the
<div class="directive-section"><h2><a name="ProxyPassInterpolateEnv" id="ProxyPassInterpolateEnv">ProxyPassInterpolateEnv</a> <a name="proxypassinterpolateenv" id="proxypassinterpolateenv">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enable Environment Variable interpolation in Reverse Proxy configurations</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyPassInterpolateEnv On|Off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProxyPassInterpolateEnv Off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in httpd 2.2.9 and later</td></tr>
<div class="directive-section"><h2><a name="ProxyPassMatch" id="ProxyPassMatch">ProxyPassMatch</a> <a name="proxypassmatch" id="proxypassmatch">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maps remote servers into the local server URL-space using regular expressions</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyPassMatch [<var>regex</var>] !|<var>url</var> [<var>key=value</var>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
<p>This directive is equivalent to <code class="directive"><a href="#proxypass">ProxyPass</a></code>,
ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com$1
<div class="directive-section"><h2><a name="ProxyPassReverse" id="ProxyPassReverse">ProxyPassReverse</a> <a name="proxypassreverse" id="proxypassreverse">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Adjusts the URL in HTTP response headers sent from a reverse
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyPassReverse [<var>path</var>] <var>url</var>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
constructing the URL is chosen in respect to the setting of the <code class="directive"><a href="/mod/core.html#usecanonicalname">UseCanonicalName</a></code> directive.</p>
(<code>RewriteRule ... [P]</code>) from <code class="module"><a href="/mod/mod_rewrite.html">mod_rewrite</a></code>
because it doesn't depend on a corresponding <code class="directive"><a href="#proxypass">ProxyPass</a></code> directive.</p>
<p>When used inside a <code class="directive"><a href="/mod/core.html#location"><Location></a></code> section, the first argument is omitted and the local
directory is obtained from the <code class="directive"><a href="/mod/core.html#location"><Location></a></code>.</p>
<div class="directive-section"><h2><a name="ProxyPassReverseCookieDomain" id="ProxyPassReverseCookieDomain">ProxyPassReverseCookieDomain</a> <a name="proxypassreversecookiedomain" id="proxypassreversecookiedomain">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Adjusts the Domain string in Set-Cookie headers from a reverse-
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyPassReverseCookieDomain <var>internal-domain</var>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
<div class="directive-section"><h2><a name="ProxyPassReverseCookiePath" id="ProxyPassReverseCookiePath">ProxyPassReverseCookiePath</a> <a name="proxypassreversecookiepath" id="proxypassreversecookiepath">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Adjusts the Path string in Set-Cookie headers from a reverse-
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyPassReverseCookiePath <var>internal-path</var>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
<div class="directive-section"><h2><a name="ProxyPreserveHost" id="ProxyPreserveHost">ProxyPreserveHost</a> <a name="proxypreservehost" id="proxypreservehost">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Use incoming Host HTTP request header for proxy
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyPreserveHost On|Off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProxyPreserveHost Off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.0.31 and later.</td></tr>
<div class="directive-section"><h2><a name="ProxyReceiveBufferSize" id="ProxyReceiveBufferSize">ProxyReceiveBufferSize</a> <a name="proxyreceivebuffersize" id="proxyreceivebuffersize">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Network buffer size for proxied HTTP and FTP
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyReceiveBufferSize <var>bytes</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProxyReceiveBufferSize 0</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<div class="directive-section"><h2><a name="ProxyRemote" id="ProxyRemote">ProxyRemote</a> <a name="proxyremote" id="proxyremote">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Remote proxy used to handle certain requests</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyRemote <var>match</var> <var>remote-server</var></code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
ProxyRemote ftp http://ftpproxy.mydomain:8080
<div class="directive-section"><h2><a name="ProxyRemoteMatch" id="ProxyRemoteMatch">ProxyRemoteMatch</a> <a name="proxyremotematch" id="proxyremotematch">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Remote proxy used to handle requests matched by regular
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyRemoteMatch <var>regex</var> <var>remote-server</var></code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
first argument is a <a class="glossarylink" href="/glossary.html#regex" title="see glossary">regular expression</a>
<div class="directive-section"><h2><a name="ProxyRequests" id="ProxyRequests">ProxyRequests</a> <a name="proxyrequests" id="proxyrequests">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables forward (standard) proxy requests</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyRequests On|Off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProxyRequests Off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
need also <code class="module"><a href="/mod/mod_proxy_http.html">mod_proxy_http</a></code> or <code class="module"><a href="/mod/mod_proxy_ftp.html">mod_proxy_ftp</a></code>
<p>Do not enable proxying with <code class="directive"><a href="#proxyrequests">ProxyRequests</a></code> until you have <a href="#access">secured your server</a>. Open proxy servers are dangerous
<div class="directive-section"><h2><a name="ProxySet" id="ProxySet">ProxySet</a> <a name="proxyset" id="proxyset">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Set various Proxy balancer or member parameters</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxySet <var>url</var> <var>key=value [key=value ...]</var></code></td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>ProxySet is only available in Apache 2.2
<code class="directive"><a href="/mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> instead of a
<div class="directive-section"><h2><a name="ProxyStatus" id="ProxyStatus">ProxyStatus</a> <a name="proxystatus" id="proxystatus">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Show Proxy LoadBalancer status in mod_status</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyStatus Off|On|Full</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProxyStatus Off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.2 and later</td></tr>
loadbalancer status data is displayed via the <code class="module"><a href="/mod/mod_status.html">mod_status</a></code>
<div class="directive-section"><h2><a name="ProxyTimeout" id="ProxyTimeout">ProxyTimeout</a> <a name="proxytimeout" id="proxytimeout">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Network timeout for proxied requests</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyTimeout <var>seconds</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Value of <code class="directive"><a href="/mod/core.html#timeout">Timeout</a></code></code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.0.31 and later</td></tr>
<div class="directive-section"><h2><a name="ProxyVia" id="ProxyVia">ProxyVia</a> <a name="proxyvia" id="proxyvia">Directive</a></h2>
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Information provided in the <code>Via</code> HTTP response
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyVia On|Off|Full|Block</code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProxyVia Off</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
proxy requests along a chain of proxy servers. See <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a> (HTTP/1.1), section
<p><span>Available Languages: </span><a href="/en/mod/mod_proxy.html" title="English"> en </a> |
<a href="/ja/mod/mod_proxy.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a></p>
<p class="apache">Copyright 2008 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div>