]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_proxy.html.en
update transformation
[apache] / docs / manual / mod / mod_proxy.html.en
1 <?xml version="1.0" encoding="ISO-8859-1"?>
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="en" xml:lang="en"><head><!--
4         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5               This file is generated from xml source: DO NOT EDIT
6         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7       -->
8 <title>mod_proxy - Apache HTTP Server</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" />
12 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
13 <body>
14 <div id="page-header">
15 <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>
16 <p class="apache">Apache HTTP Server Version 2.3</p>
17 <img alt="" src="../images/feather.gif" /></div>
18 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
19 <div id="path">
20 <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Modules</a></div>
21 <div id="page-content">
22 <div id="preamble"><h1>Apache Module mod_proxy</h1>
23 <div class="toplang">
24 <p><span>Available Languages: </span><a href="../en/mod/mod_proxy.html" title="English">&nbsp;en&nbsp;</a> |
25 <a href="../fr/mod/mod_proxy.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
26 <a href="../ja/mod/mod_proxy.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a></p>
27 </div>
28 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>HTTP/1.1 proxy/gateway server</td></tr>
29 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
30 <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>proxy_module</td></tr>
31 <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_proxy.c</td></tr></table>
32 <h3>Summary</h3>
33
34     <div class="warning"><h3>Warning</h3>
35       <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
36       network and to the Internet at large.</p>
37     </div>
38
39     <p>This module implements a proxy/gateway for Apache. It implements
40     proxying capability for <code>AJP13</code> (Apache JServe Protocol
41     version 1.3), <code>FTP</code>, <code>CONNECT</code> (for SSL),
42     <code>HTTP/0.9</code>, <code>HTTP/1.0</code>, and <code>HTTP/1.1</code>.
43     The module can be configured to connect to other proxy modules for these
44     and other protocols.</p>
45
46     <p>Apache's proxy features are divided into several modules in
47     addition to <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>:
48     <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>,
49     <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>,
50     and <code class="module"><a href="../mod/mod_proxy_connect.html">mod_proxy_connect</a></code>.  Thus, if you want to use
51     one or more of the particular proxy functions, load
52     <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> <em>and</em> the appropriate module(s)
53     into the server (either statically at compile-time or dynamically
54     via the <code class="directive"><a href="../mod/mod_so.html#loadmodule">LoadModule</a></code>
55     directive).</p>
56
57     <p>In addition, extended features are provided by other modules.
58     Caching is provided by <code class="module"><a href="../mod/mod_cache.html">mod_cache</a></code> and related
59     modules.  The ability to contact remote servers using the SSL/TLS
60     protocol is provided by the <code>SSLProxy*</code> directives of
61     <code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code>.  These additional modules will need
62     to be loaded and configured to take advantage of these features.</p>
63 </div>
64 <div id="quickview"><h3 class="directives">Directives</h3>
65 <ul id="toc">
66 <li><img alt="" src="../images/down.gif" /> <a href="#balancermember">BalancerMember</a></li>
67 <li><img alt="" src="../images/down.gif" /> <a href="#noproxy">NoProxy</a></li>
68 <li><img alt="" src="../images/down.gif" /> <a href="#proxy">&lt;Proxy&gt;</a></li>
69 <li><img alt="" src="../images/down.gif" /> <a href="#proxybadheader">ProxyBadHeader</a></li>
70 <li><img alt="" src="../images/down.gif" /> <a href="#proxyblock">ProxyBlock</a></li>
71 <li><img alt="" src="../images/down.gif" /> <a href="#proxydomain">ProxyDomain</a></li>
72 <li><img alt="" src="../images/down.gif" /> <a href="#proxyerroroverride">ProxyErrorOverride</a></li>
73 <li><img alt="" src="../images/down.gif" /> <a href="#proxyiobuffersize">ProxyIOBufferSize</a></li>
74 <li><img alt="" src="../images/down.gif" /> <a href="#proxymatch">&lt;ProxyMatch&gt;</a></li>
75 <li><img alt="" src="../images/down.gif" /> <a href="#proxymaxforwards">ProxyMaxForwards</a></li>
76 <li><img alt="" src="../images/down.gif" /> <a href="#proxypass">ProxyPass</a></li>
77 <li><img alt="" src="../images/down.gif" /> <a href="#proxypassinterpolateenv">ProxyPassInterpolateEnv</a></li>
78 <li><img alt="" src="../images/down.gif" /> <a href="#proxypassmatch">ProxyPassMatch</a></li>
79 <li><img alt="" src="../images/down.gif" /> <a href="#proxypassreverse">ProxyPassReverse</a></li>
80 <li><img alt="" src="../images/down.gif" /> <a href="#proxypassreversecookiedomain">ProxyPassReverseCookieDomain</a></li>
81 <li><img alt="" src="../images/down.gif" /> <a href="#proxypassreversecookiepath">ProxyPassReverseCookiePath</a></li>
82 <li><img alt="" src="../images/down.gif" /> <a href="#proxypreservehost">ProxyPreserveHost</a></li>
83 <li><img alt="" src="../images/down.gif" /> <a href="#proxyreceivebuffersize">ProxyReceiveBufferSize</a></li>
84 <li><img alt="" src="../images/down.gif" /> <a href="#proxyremote">ProxyRemote</a></li>
85 <li><img alt="" src="../images/down.gif" /> <a href="#proxyremotematch">ProxyRemoteMatch</a></li>
86 <li><img alt="" src="../images/down.gif" /> <a href="#proxyrequests">ProxyRequests</a></li>
87 <li><img alt="" src="../images/down.gif" /> <a href="#proxyset">ProxySet</a></li>
88 <li><img alt="" src="../images/down.gif" /> <a href="#proxystatus">ProxyStatus</a></li>
89 <li><img alt="" src="../images/down.gif" /> <a href="#proxytimeout">ProxyTimeout</a></li>
90 <li><img alt="" src="../images/down.gif" /> <a href="#proxyvia">ProxyVia</a></li>
91 </ul>
92 <h3>Topics</h3>
93 <ul id="topics">
94 <li><img alt="" src="../images/down.gif" /> <a href="#forwardreverse">Forward Proxies and Reverse 
95        Proxies/Gateways</a></li>
96 <li><img alt="" src="../images/down.gif" /> <a href="#examples">Basic Examples</a></li>
97 <li><img alt="" src="../images/down.gif" /> <a href="#access">Controlling access to your proxy</a></li>
98 <li><img alt="" src="../images/down.gif" /> <a href="#startup">Slow Startup</a></li>
99 <li><img alt="" src="../images/down.gif" /> <a href="#intranet">Intranet Proxy</a></li>
100 <li><img alt="" src="../images/down.gif" /> <a href="#envsettings">Protocol Adjustments</a></li>
101 <li><img alt="" src="../images/down.gif" /> <a href="#request-bodies">Request Bodies</a></li>
102 <li><img alt="" src="../images/down.gif" /> <a href="#x-headers">Reverse Proxy Request Headers</a></li>
103 </ul><h3>See also</h3>
104 <ul class="seealso">
105 <li><code class="module"><a href="../mod/mod_cache.html">mod_cache</a></code></li>
106 <li><code class="module"><a href="../mod/mod_proxy_http.html">mod_proxy_http</a></code></li>
107 <li><code class="module"><a href="../mod/mod_proxy_ftp.html">mod_proxy_ftp</a></code></li>
108 <li><code class="module"><a href="../mod/mod_proxy_connect.html">mod_proxy_connect</a></code></li>
109 <li><code class="module"><a href="../mod/mod_proxy_balancer.html">mod_proxy_balancer</a></code></li>
110 <li><code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code></li>
111 </ul></div>
112 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
113 <div class="section">
114 <h2><a name="forwardreverse" id="forwardreverse">Forward Proxies and Reverse 
115        Proxies/Gateways</a></h2>
116       <p>Apache can be configured in both a <dfn>forward</dfn> and
117       <dfn>reverse</dfn> proxy (also known as <dfn>gateway</dfn>) mode.</p>
118
119       <p>An ordinary <dfn>forward proxy</dfn> is an intermediate
120       server that sits between the client and the <em>origin
121       server</em>.  In order to get content from the origin server,
122       the client sends a request to the proxy naming the origin server
123       as the target and the proxy then requests the content from the
124       origin server and returns it to the client.  The client must be
125       specially configured to use the forward proxy to access other
126       sites.</p>
127
128       <p>A typical usage of a forward proxy is to provide Internet
129       access to internal clients that are otherwise restricted by a
130       firewall.  The forward proxy can also use caching (as provided
131       by <code class="module"><a href="../mod/mod_cache.html">mod_cache</a></code>) to reduce network usage.</p>
132
133       <p>The forward proxy is activated using the <code class="directive"><a href="#proxyrequests">ProxyRequests</a></code> directive.  Because
134       forward proxies allow clients to access arbitrary sites through
135       your server and to hide their true origin, it is essential that
136       you <a href="#access">secure your server</a> so that only
137       authorized clients can access the proxy before activating a
138       forward proxy.</p>
139
140       <p>A <dfn>reverse proxy</dfn> (or <dfn>gateway</dfn>), by
141       contrast, appears to the client just like an ordinary web
142       server.  No special configuration on the client is necessary.
143       The client makes ordinary requests for content in the name-space
144       of the reverse proxy.  The reverse proxy then decides where to
145       send those requests, and returns the content as if it was itself
146       the origin.</p>
147
148       <p>A typical usage of a reverse proxy is to provide Internet
149       users access to a server that is behind a firewall.  Reverse
150       proxies can also be used to balance load among several back-end
151       servers, or to provide caching for a slower back-end server.
152       In addition, reverse proxies can be used simply to bring
153       several servers into the same URL space.</p>
154
155       <p>A reverse proxy is activated using the <code class="directive"><a href="#proxypass">ProxyPass</a></code> directive or the
156       <code>[P]</code> flag to the <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> directive.  It is
157       <strong>not</strong> necessary to turn <code class="directive"><a href="#proxyrequests">ProxyRequests</a></code> on in order to
158       configure a reverse proxy.</p>
159     </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
160 <div class="section">
161 <h2><a name="examples" id="examples">Basic Examples</a></h2>
162
163     <p>The examples below are only a very basic idea to help you
164     get started.  Please read the documentation on the individual
165     directives.</p>
166
167     <p>In addition, if you wish to have caching enabled, consult
168     the documentation from <code class="module"><a href="../mod/mod_cache.html">mod_cache</a></code>.</p>
169
170     <div class="example"><h3>Forward Proxy</h3><p><code>
171     ProxyRequests On<br />
172     ProxyVia On<br />
173     <br />
174     &lt;Proxy *&gt;<br />
175     <span class="indent">
176       Order deny,allow<br />
177       Deny from all<br />
178       Allow from internal.example.com<br />
179     </span>
180     &lt;/Proxy&gt;
181     </code></p></div>
182
183     <div class="example"><h3>Reverse Proxy</h3><p><code>
184     ProxyRequests Off<br />
185     <br />
186     &lt;Proxy *&gt;<br />
187     <span class="indent">
188       Order deny,allow<br />
189       Allow from all<br />
190     </span>
191     &lt;/Proxy&gt;<br />
192     <br />
193     ProxyPass /foo http://foo.example.com/bar<br />
194     ProxyPassReverse /foo http://foo.example.com/bar
195     </code></p></div>
196     </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
197 <div class="section">
198 <h2><a name="access" id="access">Controlling access to your proxy</a></h2>
199       <p>You can control who can access your proxy via the <code class="directive"><a href="#proxy">&lt;Proxy&gt;</a></code> control block as in
200       the following example:</p>
201
202       <div class="example"><p><code>
203         &lt;Proxy *&gt;<br />
204         <span class="indent">
205           Order Deny,Allow<br />
206           Deny from all<br />
207           Allow from 192.168.0<br />
208         </span>
209         &lt;/Proxy&gt;
210       </code></p></div>
211
212       <p>For more information on access control directives, see
213       <code class="module"><a href="../mod/mod_authz_host.html">mod_authz_host</a></code>.</p>
214
215       <p>Strictly limiting access is essential if you are using a
216       forward proxy (using the <code class="directive"><a href="#proxyrequests">ProxyRequests</a></code> directive).
217       Otherwise, your server can be used by any client to access
218       arbitrary hosts while hiding his or her true identity.  This is
219       dangerous both for your network and for the Internet at large.
220       When using a reverse proxy (using the <code class="directive"><a href="#proxypass">ProxyPass</a></code> directive with
221       <code>ProxyRequests Off</code>), access control is less
222       critical because clients can only contact the hosts that you
223       have specifically configured.</p>
224
225       <p><strong>See Also</strong> the <a href="mod_proxy_http.html#env">Proxy-Chain-Auth</a> environment variable.</p>
226
227     </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
228 <div class="section">
229 <h2><a name="startup" id="startup">Slow Startup</a></h2>
230       <p>If you're using the <code class="directive"><a href="#proxyblock">ProxyBlock</a></code> directive, hostnames' IP addresses are looked up
231       and cached during startup for later match test. This may take a few
232       seconds (or more) depending on the speed with which the hostname lookups
233       occur.</p>
234     </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
235 <div class="section">
236 <h2><a name="intranet" id="intranet">Intranet Proxy</a></h2>
237       <p>An Apache proxy server situated in an intranet needs to forward
238       external requests through the company's firewall (for this, configure
239       the <code class="directive"><a href="#proxyremote">ProxyRemote</a></code> directive
240       to forward the respective <var>scheme</var> to the firewall proxy).
241       However, when it has to
242       access resources within the intranet, it can bypass the firewall when
243       accessing hosts. The <code class="directive"><a href="#noproxy">NoProxy</a></code>
244       directive is useful for specifying which hosts belong to the intranet and
245       should be accessed directly.</p>
246
247       <p>Users within an intranet tend to omit the local domain name from their
248       WWW requests, thus requesting "http://somehost/" instead of
249       <code>http://somehost.example.com/</code>. Some commercial proxy servers
250       let them get away with this and simply serve the request, implying a
251       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
252       a redirect response and send the client to the correct, fully qualified,
253       server address. This is the preferred method since the user's bookmark
254       files will then contain fully qualified hosts.</p>
255     </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
256 <div class="section">
257 <h2><a name="envsettings" id="envsettings">Protocol Adjustments</a></h2>
258       <p>For circumstances where <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> is sending
259       requests to an origin server that doesn't properly implement
260       keepalives or HTTP/1.1, there are two <a href="../env.html">environment variables</a> that can force the
261       request to use HTTP/1.0 with no keepalive. These are set via the
262       <code class="directive"><a href="../mod/mod_env.html#setenv">SetEnv</a></code> directive.</p>
263
264       <p>These are the <code>force-proxy-request-1.0</code> and
265       <code>proxy-nokeepalive</code> notes.</p>
266
267       <div class="example"><p><code>
268         &lt;Location /buggyappserver/&gt;<br />
269         <span class="indent">
270           ProxyPass http://buggyappserver:7001/foo/<br />
271           SetEnv force-proxy-request-1.0 1<br />
272           SetEnv proxy-nokeepalive 1<br />
273         </span>
274         &lt;/Location&gt;
275       </code></p></div>
276
277     </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
278 <div class="section">
279 <h2><a name="request-bodies" id="request-bodies">Request Bodies</a></h2>
280
281     <p>Some request methods such as POST include a request body.
282     The HTTP protocol requires that requests which include a body
283     either use chunked transfer encoding or send a
284     <code>Content-Length</code> request header.  When passing these
285     requests on to the origin server, <code class="module"><a href="../mod/mod_proxy_http.html">mod_proxy_http</a></code>
286     will always attempt to send the <code>Content-Length</code>.  But
287     if the body is large and the original request used chunked
288     encoding, then chunked encoding may also be used in the upstream
289     request.  You can control this selection using <a href="../env.html">environment variables</a>.  Setting
290     <code>proxy-sendcl</code> ensures maximum compatibility with
291     upstream servers by always sending the
292     <code>Content-Length</code>, while setting
293     <code>proxy-sendchunked</code> minimizes resource usage by using
294     chunked encoding.</p>
295
296     </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
297 <div class="section">
298 <h2><a name="x-headers" id="x-headers">Reverse Proxy Request Headers</a></h2>
299
300     <p>When acting in a reverse-proxy mode (using the <code class="directive"><a href="#proxypass">ProxyPass</a></code> directive, for example),
301     <code class="module"><a href="../mod/mod_proxy_http.html">mod_proxy_http</a></code> adds several request headers in
302     order to pass information to the origin server. These headers
303     are:</p>
304
305     <dl>
306       <dt><code>X-Forwarded-For</code></dt>
307       <dd>The IP address of the client.</dd>
308       <dt><code>X-Forwarded-Host</code></dt>
309       <dd>The original host requested by the client in the <code>Host</code> 
310        HTTP request header.</dd>
311       <dt><code>X-Forwarded-Server</code></dt>
312       <dd>The hostname of the proxy server.</dd>
313     </dl>
314
315     <p>Be careful when using these headers on the origin server, since
316     they will contain more than one (comma-separated) value if the
317     original request already contained one of these headers. For
318     example, you can use <code>%{X-Forwarded-For}i</code> in the log
319     format string of the origin server to log the original clients IP
320     address, but you may get more than one address if the request
321     passes through several proxies.</p>
322
323     <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
324     other request headers.</p>
325
326    </div>
327 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
328 <div class="directive-section"><h2><a name="BalancerMember" id="BalancerMember">BalancerMember</a> <a name="balancermember" id="balancermember">Directive</a></h2>
329 <table class="directive">
330 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Add a member to a load balancing group</td></tr>
331 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>BalancerMember [<var>balancerurl</var>] <var>url</var> [<var>key=value [key=value ...]]</var></code></td></tr>
332 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
333 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
334 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
335 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>BalancerMember is only available in Apache 2.2
336   and later.</td></tr>
337 </table>
338     <p>This directive adds a member to a load balancing group. It could be used
339     within a <code>&lt;Proxy <var>balancer://</var>...&gt;</code> container
340     directive, and can take any of the key value pair parameters available to
341     <code class="directive"><a href="#proxypass">ProxyPass</a></code> directives.</p>
342     <p>One additional parameter is available only to <code class="directive"><a href="#balancermember">BalancerMember</a></code> directives:
343     <var>loadfactor</var>. This is the member load factor - a number between 1 
344     (default) and 100, which defines the weighted load to be applied to the 
345     member in question.</p>
346     <p>The balancerurl is only needed when not in <code>&lt;Proxy <var>balancer://</var>...&gt;</code>
347     container directive. It corresponds to the url of a balancer defined in
348     <code class="directive"><a href="#proxypass">ProxyPass</a></code> directive.</p>
349
350 </div>
351 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
352 <div class="directive-section"><h2><a name="NoProxy" id="NoProxy">NoProxy</a> <a name="noproxy" id="noproxy">Directive</a></h2>
353 <table class="directive">
354 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Hosts, domains, or networks that will be connected to
355 directly</td></tr>
356 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>NoProxy <var>host</var> [<var>host</var>] ...</code></td></tr>
357 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
358 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
359 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
360 </table>
361     <p>This directive is only useful for Apache proxy servers within
362     intranets.  The <code class="directive">NoProxy</code> directive specifies a
363     list of subnets, IP addresses, hosts and/or domains, separated by
364     spaces. A request to a host which matches one or more of these is
365     always served directly, without forwarding to the configured
366     <code class="directive"><a href="#proxyremote">ProxyRemote</a></code> proxy server(s).</p>
367
368     <div class="example"><h3>Example</h3><p><code>
369       ProxyRemote  *  http://firewall.example.com:81<br />
370       NoProxy         .example.com 192.168.112.0/21
371     </code></p></div>
372
373     <p>The <var>host</var> arguments to the <code class="directive">NoProxy</code>
374     directive are one of the following type list:</p>
375
376     <dl>
377     
378     <dt><var><a name="domain" id="domain">Domain</a></var></dt>
379     <dd>
380     <p>A <dfn>Domain</dfn> is a partially qualified DNS domain name, preceded
381     by a period. It represents a list of hosts which logically belong to the
382     same DNS domain or zone (<em>i.e.</em>, the suffixes of the hostnames are
383     all ending in <var>Domain</var>).</p>
384
385     <div class="example"><h3>Examples</h3><p><code>
386       .com .apache.org.
387     </code></p></div>
388
389     <p>To distinguish <var>Domain</var>s from <var><a href="#hostname">Hostname</a></var>s (both syntactically and semantically; a DNS domain can
390     have a DNS A record, too!), <var>Domain</var>s are always written with a
391     leading period.</p>
392     
393     <div class="note"><h3>Note</h3>
394       <p>Domain name comparisons are done without regard to the case, and
395       <var>Domain</var>s are always assumed to be anchored in the root of the
396       DNS tree, therefore two domains <code>.ExAmple.com</code> and
397       <code>.example.com.</code> (note the trailing period) are considered
398       equal. Since a domain comparison does not involve a DNS lookup, it is much
399       more efficient than subnet comparison.</p>
400     </div></dd>
401
402     
403     <dt><var><a name="subnet" id="subnet">SubNet</a></var></dt>
404     <dd>
405     <p>A <dfn>SubNet</dfn> is a partially qualified internet address in
406     numeric (dotted quad) form, optionally followed by a slash and the netmask,
407     specified as the number of significant bits in the <var>SubNet</var>. It is
408     used to represent a subnet of hosts which can be reached over a common
409     network interface. In the absence of the explicit net mask it is assumed
410     that omitted (or zero valued) trailing digits specify the mask. (In this
411     case, the netmask can only be multiples of 8 bits wide.) Examples:</p>
412
413     <dl>
414     <dt><code>192.168</code> or <code>192.168.0.0</code></dt>
415     <dd>the subnet 192.168.0.0 with an implied netmask of 16 valid bits
416     (sometimes used in the netmask form <code>255.255.0.0</code>)</dd>
417     <dt><code>192.168.112.0/21</code></dt>
418     <dd>the subnet <code>192.168.112.0/21</code> with a netmask of 21
419     valid bits (also used in the form <code>255.255.248.0</code>)</dd>
420     </dl>
421
422     <p>As a degenerate case, a <em>SubNet</em> with 32 valid bits is the
423     equivalent to an <var><a href="#ipadr">IPAddr</a></var>, while a <var>SubNet</var> with zero
424     valid bits (<em>e.g.</em>, 0.0.0.0/0) is the same as the constant
425     <var>_Default_</var>, matching any IP address.</p></dd>
426
427     
428     <dt><var><a name="ipaddr" id="ipaddr">IPAddr</a></var></dt>
429     <dd>
430     <p>A <dfn>IPAddr</dfn> represents a fully qualified internet address in
431     numeric (dotted quad) form. Usually, this address represents a host, but
432     there need not necessarily be a DNS domain name connected with the
433     address.</p>
434     <div class="example"><h3>Example</h3><p><code>
435       192.168.123.7
436     </code></p></div>
437     
438     <div class="note"><h3>Note</h3>
439       <p>An <var>IPAddr</var> does not need to be resolved by the DNS system, so
440       it can result in more effective apache performance.</p>
441     </div></dd>
442
443     
444     <dt><var><a name="hostname" id="hostname">Hostname</a></var></dt>
445     <dd>
446     <p>A <dfn>Hostname</dfn> is a fully qualified DNS domain name which can
447     be resolved to one or more <var><a href="#ipaddr">IPAddrs</a></var> via the
448     DNS domain name service. It represents a logical host (in contrast to
449     <var><a href="#domain">Domain</a></var>s, see above) and must be resolvable
450     to at least one <var><a href="#ipaddr">IPAddr</a></var> (or often to a list
451     of hosts with different <var><a href="#ipaddr">IPAddr</a></var>s).</p>
452
453     <div class="example"><h3>Examples</h3><p><code>
454       prep.ai.example.com<br />
455       www.apache.org
456     </code></p></div>
457
458     <div class="note"><h3>Note</h3>
459       <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
460       DNS lookup can be avoided. Name resolution in Apache can take a remarkable
461       deal of time when the connection to the name server uses a slow PPP
462       link.</p>
463       <p><var>Hostname</var> comparisons are done without regard to the case,
464       and <var>Hostname</var>s are always assumed to be anchored in the root
465       of the DNS tree, therefore two hosts <code>WWW.ExAmple.com</code>
466       and <code>www.example.com.</code> (note the trailing period) are
467       considered equal.</p>
468      </div></dd>
469     </dl>
470
471 <h3>See also</h3>
472 <ul>
473 <li><a href="../dns-caveats.html">DNS Issues</a></li>
474 </ul>
475 </div>
476 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
477 <div class="directive-section"><h2><a name="Proxy" id="Proxy">&lt;Proxy&gt;</a> <a name="proxy" id="proxy">Directive</a></h2>
478 <table class="directive">
479 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Container for directives applied to proxied resources</td></tr>
480 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;Proxy <var>wildcard-url</var>&gt; ...&lt;/Proxy&gt;</code></td></tr>
481 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
482 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
483 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
484 </table>
485     <p>Directives placed in <code class="directive">&lt;Proxy&gt;</code>
486     sections apply only to matching proxied content.  Shell-style wildcards are
487     allowed.</p>
488
489     <p>For example, the following will allow only hosts in
490     <code>yournetwork.example.com</code> to access content via your proxy
491     server:</p>
492
493     <div class="example"><p><code>
494       &lt;Proxy *&gt;<br />
495       <span class="indent">
496         Order Deny,Allow<br />
497         Deny from all<br />
498         Allow from yournetwork.example.com<br />
499       </span>
500       &lt;/Proxy&gt;
501     </code></p></div>
502
503     <p>The following example will process all files in the <code>foo</code>
504     directory of <code>example.com</code> through the <code>INCLUDES</code>
505     filter when they are sent through the proxy server:</p>
506
507     <div class="example"><p><code>
508       &lt;Proxy http://example.com/foo/*&gt;<br />
509       <span class="indent">
510         SetOutputFilter INCLUDES<br />
511       </span>
512       &lt;/Proxy&gt;
513     </code></p></div>
514
515
516 <h3>See also</h3>
517 <ul>
518 <li><code class="directive"><a href="#proxymatch">&lt;ProxyMatch&gt;</a></code></li>
519 </ul>
520 </div>
521 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
522 <div class="directive-section"><h2><a name="ProxyBadHeader" id="ProxyBadHeader">ProxyBadHeader</a> <a name="proxybadheader" id="proxybadheader">Directive</a></h2>
523 <table class="directive">
524 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines how to handle bad header lines in a
525 response</td></tr>
526 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyBadHeader IsError|Ignore|StartBody</code></td></tr>
527 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProxyBadHeader IsError</code></td></tr>
528 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
529 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
530 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
531 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.0.44 and later</td></tr>
532 </table>
533     <p>The <code class="directive">ProxyBadHeader</code> directive determines the
534     behaviour of <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> if it receives syntactically invalid
535     header lines (<em>i.e.</em> containing no colon). The following arguments
536     are possible:</p>
537
538     <dl>
539     <dt><code>IsError</code></dt>
540     <dd>Abort the request and end up with a 502 (Bad Gateway) response. This is
541     the default behaviour.</dd>
542
543     <dt><code>Ignore</code></dt>
544     <dd>Treat bad header lines as if they weren't sent.</dd>
545
546     <dt><code>StartBody</code></dt>
547     <dd>When receiving the first bad header line, finish reading the headers and
548     treat the remainder as body. This helps to work around buggy backend servers
549     which forget to insert an empty line between the headers and the body.</dd>
550     </dl>
551
552 </div>
553 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
554 <div class="directive-section"><h2><a name="ProxyBlock" id="ProxyBlock">ProxyBlock</a> <a name="proxyblock" id="proxyblock">Directive</a></h2>
555 <table class="directive">
556 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Words, hosts, or domains that are banned from being
557 proxied</td></tr>
558 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyBlock *|<var>word</var>|<var>host</var>|<var>domain</var>
559 [<var>word</var>|<var>host</var>|<var>domain</var>] ...</code></td></tr>
560 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
561 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
562 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
563 </table>
564     <p>The <code class="directive">ProxyBlock</code> directive specifies a list of
565     words, hosts and/or domains, separated by spaces.  HTTP, HTTPS, and
566     FTP document requests to sites whose names contain matched words,
567     hosts or domains are <em>blocked</em> by the proxy server. The proxy
568     module will also attempt to determine IP addresses of list items which
569     may be hostnames during startup, and cache them for match test as
570     well. That may slow down the startup time of the server.</p>
571
572     <div class="example"><h3>Example</h3><p><code>
573       ProxyBlock joes-garage.com some-host.co.uk rocky.wotsamattau.edu
574     </code></p></div>
575
576     <p><code>rocky.wotsamattau.edu</code> would also be matched if referenced by
577     IP address.</p>
578
579     <p>Note that <code>wotsamattau</code> would also be sufficient to match
580     <code>wotsamattau.edu</code>.</p>
581
582     <p>Note also that</p>
583
584     <div class="example"><p><code>
585       ProxyBlock *
586     </code></p></div>
587
588     <p>blocks connections to all sites.</p>
589
590 </div>
591 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
592 <div class="directive-section"><h2><a name="ProxyDomain" id="ProxyDomain">ProxyDomain</a> <a name="proxydomain" id="proxydomain">Directive</a></h2>
593 <table class="directive">
594 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Default domain name for proxied requests</td></tr>
595 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyDomain <var>Domain</var></code></td></tr>
596 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
597 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
598 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
599 </table>
600     <p>This directive is only useful for Apache proxy servers within
601     intranets. The <code class="directive">ProxyDomain</code> directive specifies
602     the default domain which the apache proxy server will belong to. If a
603     request to a host without a domain name is encountered, a redirection
604     response to the same host with the configured <var>Domain</var> appended
605     will be generated.</p>
606
607     <div class="example"><h3>Example</h3><p><code>
608       ProxyRemote  *  http://firewall.example.com:81<br />
609       NoProxy         .example.com 192.168.112.0/21<br />
610       ProxyDomain     .example.com
611     </code></p></div>
612
613 </div>
614 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
615 <div class="directive-section"><h2><a name="ProxyErrorOverride" id="ProxyErrorOverride">ProxyErrorOverride</a> <a name="proxyerroroverride" id="proxyerroroverride">Directive</a></h2>
616 <table class="directive">
617 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Override error pages for proxied content</td></tr>
618 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyErrorOverride On|Off</code></td></tr>
619 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProxyErrorOverride Off</code></td></tr>
620 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
621 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
622 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
623 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.0 and later</td></tr>
624 </table>
625     <p>This directive is useful for reverse-proxy setups, where you want to 
626     have a common look and feel on the error pages seen by the end user. 
627     This also allows for included files (via
628     <code class="module"><a href="../mod/mod_include.html">mod_include</a></code>'s SSI) to get
629     the error code and act accordingly (default behavior would display
630     the error page of the proxied server, turning this on shows the SSI
631     Error message).</p>
632
633     <p>This directive does not affect the processing of informational (1xx),
634     normal success (2xx), or redirect (3xx) responses.</p>
635
636 </div>
637 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
638 <div class="directive-section"><h2><a name="ProxyIOBufferSize" id="ProxyIOBufferSize">ProxyIOBufferSize</a> <a name="proxyiobuffersize" id="proxyiobuffersize">Directive</a></h2>
639 <table class="directive">
640 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determine size of internal data throughput buffer</td></tr>
641 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyIOBufferSize <var>bytes</var></code></td></tr>
642 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProxyIOBufferSize 8192</code></td></tr>
643 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
644 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
645 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
646 </table>
647     <p>The <code class="directive">ProxyIOBufferSize</code> directive adjusts the size
648     of the internal buffer, which is used as a scratchpad for the data between
649     input and output. The size must be at least <code>512</code>.</p>
650
651     <p>In almost every case there's no reason to change that value.</p>
652     <p>If used with AJP this directive sets the maximum AJP packet size in
653     bytes. If you change it from the default, you must also change the 
654     <code>packetSize</code> attribute of your AJP connector on the
655     Tomcat side! The attribute <code>packetSize</code> is only available
656     in Tomcat <code>5.5.20+</code> and <code>6.0.2+</code></p>
657     <p>Normally it is not necessary to change the maximum packet size.
658     Problems with the default value have been reported when sending
659     certificates or certificate chains.</p>
660     
661
662 </div>
663 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
664 <div class="directive-section"><h2><a name="ProxyMatch" id="ProxyMatch">&lt;ProxyMatch&gt;</a> <a name="proxymatch" id="proxymatch">Directive</a></h2>
665 <table class="directive">
666 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Container for directives applied to regular-expression-matched 
667 proxied resources</td></tr>
668 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>&lt;ProxyMatch <var>regex</var>&gt; ...&lt;/ProxyMatch&gt;</code></td></tr>
669 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
670 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
671 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
672 </table>
673     <p>The <code class="directive">&lt;ProxyMatch&gt;</code> directive is
674     identical to the <code class="directive"><a href="#proxy">&lt;Proxy&gt;</a></code> directive, except it matches URLs
675     using <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular expressions</a>.</p>
676
677 <h3>See also</h3>
678 <ul>
679 <li><code class="directive"><a href="#proxy">&lt;Proxy&gt;</a></code></li>
680 </ul>
681 </div>
682 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
683 <div class="directive-section"><h2><a name="ProxyMaxForwards" id="ProxyMaxForwards">ProxyMaxForwards</a> <a name="proxymaxforwards" id="proxymaxforwards">Directive</a></h2>
684 <table class="directive">
685 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximium number of proxies that a request can be forwarded
686 through</td></tr>
687 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyMaxForwards <var>number</var></code></td></tr>
688 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProxyMaxForwards -1</code></td></tr>
689 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
690 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
691 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
692 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.0 and later;
693         default behaviour changed in 2.2.7/2.3</td></tr>
694 </table>
695     <p>The <code class="directive">ProxyMaxForwards</code> directive specifies the
696     maximum number of proxies through which a request may pass, if there's no
697     <code>Max-Forwards</code> header supplied with the request. This may
698     be set to prevent infinite proxy loops, or a DoS attack.</p>
699
700     <div class="example"><h3>Example</h3><p><code>
701       ProxyMaxForwards 15
702     </code></p></div>
703
704     <p>Note that setting <code class="directive">ProxyMaxForwards</code> is a
705     violation of the HTTP/1.1 protocol (RFC2616), which forbids a Proxy
706     setting <code>Max-Forwards</code> if the Client didn't set it.
707     Earlier Apache versions would always set it.  A negative
708     <code class="directive">ProxyMaxForwards</code> value, including the
709     default -1, gives you protocol-compliant behaviour, but may
710     leave you open to loops.</p>
711
712 </div>
713 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
714 <div class="directive-section"><h2><a name="ProxyPass" id="ProxyPass">ProxyPass</a> <a name="proxypass" id="proxypass">Directive</a></h2>
715 <table class="directive">
716 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maps remote servers into the local server URL-space</td></tr>
717 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyPass [<var>path</var>] !|<var>url</var> [<var>key=value</var>
718   <var>[key=value</var> ...]] [nocanon] [interpolate]</code></td></tr>
719 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
720 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
721 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
722 </table>
723     <p>This directive allows remote servers to be mapped into the
724     space of the local server; the local server does not act as a
725     proxy in the conventional sense, but appears to be a mirror of the
726     remote server. The local server is often called a <dfn>reverse
727     proxy</dfn> or <dfn>gateway</dfn>. The <var>path</var> is the name of
728     a local virtual path; <var>url</var> is a partial URL for the
729     remote server and cannot include a query string.</p>
730
731     <div class="warning">The <code class="directive"><a href="#proxyrequests">ProxyRequests</a></code> directive should
732     usually be set <strong>off</strong> when using
733     <code class="directive">ProxyPass</code>.</div>
734
735     <p>Suppose the local server has address <code>http://example.com/</code>;
736     then</p>
737
738     <div class="example"><p><code>
739       ProxyPass /mirror/foo/ http://backend.example.com/
740     </code></p></div>
741
742     <p>will cause a local request for
743     <code>http://example.com/mirror/foo/bar</code> to be internally converted
744     into a proxy request to <code>http://backend.example.com/bar</code>.</p>
745
746     <div class="warning">
747     <p>If the first argument ends with a trailing <strong>/</strong>, the second
748        argument should also end with a trailing <strong>/</strong> and vice
749        versa. Otherwise the resulting requests to the backend may miss some
750        needed slashes and do not deliver the expected results.
751     </p>
752     </div>
753
754     <p>The <code>!</code> directive is useful in situations where you don't want
755     to reverse-proxy a subdirectory, <em>e.g.</em></p>
756
757     <div class="example"><p><code>
758       ProxyPass /mirror/foo/i !<br />
759       ProxyPass /mirror/foo http://backend.example.com
760     </code></p></div>
761
762     <p>will proxy all requests to <code>/mirror/foo</code> to
763     <code>backend.example.com</code> <em>except</em> requests made to
764     <code>/mirror/foo/i</code>.</p>
765
766     <div class="note"><h3>Note</h3>
767       <p>Order is important: exclusions must come <em>before</em> the
768       general <code class="directive">ProxyPass</code> directive.</p>
769     </div>
770
771     <p>As of Apache 2.1, the ability to use pooled connections to a backend
772     server is available. Using the <code>key=value</code> parameters it is
773     possible to tune this connection pooling. The default for a <code>Hard
774     Maximum</code> for the number of connections is the number of threads per
775     process in the active MPM. In the Prefork MPM, this is always 1, while with
776     the Worker MPM it is controlled by the
777     <code class="directive">ThreadsPerChild</code>.</p>
778
779     <p>Setting <code>min</code> will determine how many connections will always 
780     be open to the backend server. Upto the Soft Maximum or <code>smax</code> 
781     number of connections will be created on demand. Any connections above 
782     <code>smax</code> are subject to a time to live or <code>ttl</code>.  Apache
783     will never create more than the Hard Maximum or <code>max</code> connections
784     to the backend server.</p>
785
786     <div class="example"><p><code>
787         ProxyPass /example http://backend.example.com smax=5 max=20 ttl=120 retry=300
788     </code></p></div>
789
790     <table>
791     <tr><th>Parameter</th>
792         <th>Default</th>
793         <th>Description</th></tr>
794     <tr><td>min</td>
795         <td>0</td>
796         <td>Minimum number of connections that will always
797             be open to the backend server.</td></tr>
798     <tr><td>max</td>
799         <td>1...n</td>
800         <td>Hard Maximum number of connections that will be
801     allowed to the backend server. The default for a Hard Maximum
802     for the number of connections is the number of threads per process in the 
803     active MPM. In the Prefork MPM, this is always 1, while with the Worker MPM
804     it is controlled by the <code class="directive">ThreadsPerChild</code>.
805     Apache will never create more than the Hard Maximum connections
806     to the backend server.</td></tr>
807     <tr><td>smax</td>
808         <td>max</td>
809         <td>Upto the Soft Maximum
810     number of connections will be created on demand. Any connections above 
811     <code>smax</code> are subject to a time to live or <code>ttl</code>.
812     </td></tr>
813     <tr><td>acquire</td>
814         <td>-</td>
815         <td>If set this will be the maximum time to wait for a free
816     connection in the connection pool, in milliseconds. If there are no free
817     connections in the pool the Apache will return <code>SERVER_BUSY</code>
818     status to the client.
819     </td></tr>
820     <tr><td>connectiontimeout</td>
821         <td>timeout</td>
822         <td>Connect timeout in seconds.
823         The number of seconds Apache waits for the creation of a connection to
824         the backend to complete. By adding a postfix of ms the timeout can be
825         also set in milliseconds.
826     </td></tr>
827     <tr><td>disablereuse</td>
828         <td>Off</td>
829         <td>This parameter should be used when you want to force mod_proxy
830     to immediately close a connection to the backend after being used, and
831     thus, disable its persistent connection and pool for that backend.
832     This helps in various situations where a firewall between Apache and
833     the backend server (regardless of protocol) tends to silently
834     drop connections or when backends themselves may be under round-
835     robin DNS. To disable connection pooling reuse,
836     set this property value to <code>On</code>. 
837     </td></tr>
838     <tr><td>flushpackets</td>
839         <td>off</td>
840         <td>Determines whether the proxy module will auto-flush the output
841         brigade after each "chunk" of data. 'off' means that it will flush
842         only when needed, 'on' means after each chunk is sent and
843         'auto' means poll/wait for a period of time and flush if
844         no input has been received for 'flushwait' milliseconds.
845         Currently this is in effect only for AJP.
846     </td></tr>
847     <tr><td>flushwait</td>
848         <td>10</td>
849         <td>The time to wait for additional input, in milliseconds, before
850         flushing the output brigade if 'flushpackets' is 'auto'.
851     </td></tr>
852     <tr><td>iobuffersize</td>
853         <td>8192</td>
854         <td>Adjusts the size of the internal scratchpad IO buffer. This allows you
855         to override the <code class="directive">ProxyIOBufferSize</code> for a specific worker.
856         This must be at least 512 or set to 0 for the system default of 8192.
857     </td></tr>
858     <tr><td>keepalive</td>
859         <td>Off</td>
860         <td>This parameter should be used when you have a firewall between your
861     Apache and the backend server, who tend to drop inactive connections.
862     This flag will tell the Operating System to send <code>KEEP_ALIVE</code>
863     messages on inactive connections (interval depends on global OS settings,
864     generally 120ms), and thus prevent the firewall to drop the connection.
865     To enable keepalive set this property value to <code>On</code>. 
866     </td></tr>
867     <tr><td>lbset</td>
868         <td>0</td>
869         <td>Sets the load balancer cluster set that the worker is a member
870          of. The load balancer will try all members of a lower numbered
871          lbset before trying higher numbered ones.
872     </td></tr>
873     <tr><td>ping</td>
874         <td>0</td>
875         <td>Ping property tells webserver to send a <code>CPING</code>
876         request on ajp13 connection before forwarding a request.
877         The parameter is the delay in seconds to wait for the
878         <code>CPONG</code> reply.
879         This features has been added to avoid problem with hung and
880         busy Tomcat's and require ajp13 ping/pong support which has
881         been implemented on Tomcat 3.3.2+, 4.1.28+ and 5.0.13+.
882         This will increase the network traffic during the normal operation
883         which could be an issue, but it will lower the
884         traffic in case some of the cluster nodes are down or busy.
885         Currently this has an effect only for AJP.
886         By adding a postfix of ms the delay can be also set in
887         milliseconds.
888     </td></tr>
889     <tr><td>receivebuffersize</td>
890         <td>0</td>
891         <td>Adjusts the size of the explicit (TCP/IP) network buffer size for
892         proxied connections. This allows you to override the
893         <code class="directive">ProxyReceiveBufferSize</code> for a specific worker.
894         This must be at least 512 or set to 0 for the system default.
895     </td></tr>
896     <tr><td>redirect</td>
897         <td>-</td>
898         <td>Redirection Route of the worker. This value is usually
899         set dynamically to enable safe removal of the node from
900         the cluster. If set all requests without session id will be
901         redirected to the BalancerMember that has route parametar
902         equal as this value.
903     </td></tr>
904     <tr><td>retry</td>
905         <td>60</td>
906         <td>Connection pool worker retry timeout in seconds.
907     If the connection pool worker to the backend server is in the error state,
908     Apache will not forward any requests to that server until the timeout
909     expires. This enables to shut down the backend server for maintenance,
910     and bring it back online later. A value of 0 means always retry workers
911     in an error state with no timeout.
912     </td></tr>
913     <tr><td>route</td>
914         <td>-</td>
915         <td>Route of the worker when used inside load balancer.
916         The route is a value appended to session id.
917     </td></tr>
918     <tr><td>status</td>
919         <td>-</td>
920         <td>Single letter value defining the initial status of
921         this worker: 'D' is disabled, 'S' is stopped, 'I' is ignore-errors,
922         'H' is hot-standby and 'E' is in an error state. Status 
923         can be set (which is the default) by prepending with '+' or 
924         cleared by prepending with '-'.
925         Thus, a setting of 'S-E' sets this worker to Stopped and
926         clears the in-error flag.
927     </td></tr>
928     <tr><td>timeout</td>
929         <td><code class="directive"><a href="#proxytimeout">ProxyTimeout</a></code></td>
930         <td>Connection timeout in seconds.
931         The number of seconds Apache waits for data sent by / to the backend.
932     </td></tr>
933     <tr><td>ttl</td>
934         <td>-</td>
935         <td>Time To Live for the inactive connections above the
936         <code>smax</code> connections in seconds. Apache will close all
937         connections that has not been used inside that time period.
938     </td></tr>
939
940     </table>
941
942     <p>If the Proxy directive scheme starts with the
943     <code>balancer://</code> (eg: <code>balancer://cluster/</code>, 
944     any path information is ignored)  then a virtual worker that does not really
945     communicate with the backend server will be created. Instead it is responsible
946     for the management of several "real" workers. In that case the special set of
947     parameters can be add to this virtual worker. See <code class="module"><a href="../mod/mod_proxy_balancer.html">mod_proxy_balancer</a></code>
948     for more information about how the balancer works.
949     </p>
950     <table>
951     <tr><th>Parameter</th>
952         <th>Default</th>
953         <th>Description</th></tr>
954     <tr><td>lbmethod</td>
955         <td>byrequests</td>
956         <td>Balancer load-balance method. Select the load-balancing scheduler
957         method to use. Either <code>byrequests</code>, to perform weighted
958         request counting, <code>bytraffic</code>, to perform weighted
959         traffic byte count balancing, or <code>bybusyness</code>, to perform 
960         pending request balancing. Default is <code>byrequests</code>.
961     </td></tr>
962     <tr><td>maxattempts</td>
963         <td>1</td>
964         <td>Maximum number of failover attempts before giving up. 
965     </td></tr>
966     <tr><td>nofailover</td>
967         <td>Off</td>
968         <td>If set to <code>On</code> the session will break if the worker is in
969         error state or disabled. Set this value to On if backend servers do not
970         support session replication.
971     </td></tr>
972     <tr><td>stickysession</td>
973         <td>-</td>
974         <td>Balancer sticky session name. The value is usually set to something
975         like <code>JSESSIONID</code> or <code>PHPSESSIONID</code>,
976         and it depends on the backend application server that support sessions.
977         If the backend application server uses different name for cookies
978         and url encoded id (like servlet containers) use | to to separate them.
979         The first part is for the cookie the second for the path.
980     </td></tr>
981     <tr><td>scolonpathdelim</td>
982         <td>Off</td>
983         <td>If set to <code>On</code> the semi-colon character ';' will be
984         used as an additional sticky session path deliminator/separator. This
985         is mainly used to emulate mod_jk's behavior when dealing with paths such
986         as <code>JSESSIONID=6736bcf34;foo=aabfa</code>
987     </td></tr>
988     <tr><td>timeout</td>
989         <td>0</td>
990         <td>Balancer timeout in seconds. If set this will be the maximum time
991         to wait for a free worker. Default is not to wait. 
992     </td></tr>
993     
994     </table>
995     <p>A sample balancer setup</p>
996     <div class="example"><p><code>
997       ProxyPass /special-area http://special.example.com smax=5 max=10<br />
998       ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On<br />
999       &lt;Proxy balancer://mycluster&gt;<br />
1000       <span class="indent">
1001         BalancerMember http://1.2.3.4:8009<br />
1002         BalancerMember http://1.2.3.5:8009 smax=10<br />
1003         # Less powerful server, don't send as many requests there<br />
1004         BalancerMember http://1.2.3.6:8009 smax=1 loadfactor=20<br />
1005       </span>
1006       &lt;/Proxy&gt;
1007     </code></p></div>
1008
1009     <p>Setting up a hot-standby, that will only be used if no other
1010      members are available</p>
1011     <div class="example"><p><code>
1012       ProxyPass / balancer://hotcluster/ <br />
1013       &lt;Proxy balancer://hotcluster&gt;<br />
1014       <span class="indent">
1015         BalancerMember http://1.2.3.4:8009 loadfactor=1<br />
1016         BalancerMember http://1.2.3.5:8009 loadfactor=2<br />
1017         # The below is the hot standby<br />
1018         BalancerMember http://1.2.3.6:8009 status=+H<br />
1019         ProxySet lbmethod=bytraffic
1020       </span>
1021       &lt;/Proxy&gt;
1022     </code></p></div>
1023
1024     <p>Normally, mod_proxy will canonicalise ProxyPassed URLs.
1025     But this may be incompatible with some backends, particularly those
1026     that make use of <var>PATH_INFO</var>.  The optional <var>nocanon</var>
1027     keyword suppresses this, and passes the URL path "raw" to the
1028     backend.  Note that may affect the security of your backend, as it
1029     removes the normal limited protection against URL-based attacks
1030     provided by the proxy.</p>
1031
1032     <p>The optional <var>interpolate</var> keyword (available in
1033     httpd 2.2.9 and later), in combination with
1034     <code class="directive">ProxyPassInterpolateEnv</code> causes the ProxyPass
1035     to interpolate environment variables, using the syntax
1036     <var>${VARNAME}</var>.  Note that many of the standard CGI-derived
1037     environment variables will not exist when this interpolation happens,
1038     so you may still have to resort to <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>
1039     for complex rules.</p>
1040
1041     <p>When used inside a <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code> section, the first argument is omitted and the local
1042     directory is obtained from the <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code>.</p>
1043
1044     <p>If you require a more flexible reverse-proxy configuration, see the
1045     <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> directive with the
1046     <code>[P]</code> flag.</p>
1047
1048 </div>
1049 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1050 <div class="directive-section"><h2><a name="ProxyPassInterpolateEnv" id="ProxyPassInterpolateEnv">ProxyPassInterpolateEnv</a> <a name="proxypassinterpolateenv" id="proxypassinterpolateenv">Directive</a></h2>
1051 <table class="directive">
1052 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enable Environment Variable interpolation in Reverse Proxy configurations</td></tr>
1053 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyPassInterpolateEnv On|Off</code></td></tr>
1054 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProxyPassInterpolateEnv Off</code></td></tr>
1055 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
1056 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1057 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
1058 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in httpd 2.2.9 and later</td></tr>
1059 </table>
1060     <p>This directive, together with the <var>interpolate</var> argument to
1061     <code class="directive">ProxyPass</code>, <code class="directive">ProxyPassReverse</code>,
1062     <code class="directive">ProxyPassReverseCookieDomain</code> and
1063     <code class="directive">ProxyPassReverseCookiePath</code>
1064     enables reverse proxies to be dynamically
1065     configured using environment variables, which may be set by
1066     another module such as <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>.
1067     It affects the <code class="directive">ProxyPass</code>,
1068     <code class="directive">ProxyPassReverse</code>,
1069     <code class="directive">ProxyPassReverseCookieDomain</code>, and
1070     <code class="directive">ProxyPassReverseCookiePath</code> directives,
1071     and causes them to substitute the value of an environment
1072     variable <code>varname</code> for the string <code>${varname}</code>
1073     in configuration directives.</p>
1074     <p>Keep this turned off (for server performance) unless you need it!</p>
1075
1076 </div>
1077 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1078 <div class="directive-section"><h2><a name="ProxyPassMatch" id="ProxyPassMatch">ProxyPassMatch</a> <a name="proxypassmatch" id="proxypassmatch">Directive</a></h2>
1079 <table class="directive">
1080 <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>
1081 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyPassMatch [<var>regex</var>] !|<var>url</var> [<var>key=value</var>
1082         <var>[key=value</var> ...]]</code></td></tr>
1083 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
1084 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1085 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
1086 </table>
1087     <p>This directive is equivalent to <code class="directive"><a href="#proxypass">ProxyPass</a></code>,
1088        but makes use of regular expressions, instead of simple prefix matching. The
1089        supplied regular expression is matched against the <var>url</var>, and if it
1090        matches, the server will substitute any parenthesized matches into the given
1091        string and use it as a new <var>url</var>.</p>
1092
1093     <p>Suppose the local server has address <code>http://example.com/</code>;
1094     then</p>
1095
1096     <div class="example"><p><code>
1097       ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com$1
1098     </code></p></div>
1099
1100     <p>will cause a local request for
1101     <code>http://example.com/foo/bar.gif</code> to be internally converted
1102     into a proxy request to <code>http://backend.example.com/foo/bar.gif</code>.</p>
1103     <div class="note"><h3>Note</h3>
1104       <p>The URL argument must be parsable as a URL <em>before</em> regexp
1105       substitutions (as well as after).  This limits the matches you can use.
1106       For instance, if we had used</p>
1107       <div class="example"><p><code>
1108         ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com:8000$1
1109       </code></p></div>
1110       <p>in our previous example, it would fail with a syntax error
1111       at server startup.  This is a bug (PR 46665 in the ASF bugzilla),
1112       and the workaround is to reformulate the match:</p>
1113       <div class="example"><p><code>
1114         ProxyPassMatch ^/(.*\.gif)$ http://backend.example.com:8000/$1
1115       </code></p></div>
1116     </div>
1117     <p>The <code>!</code> directive is useful in situations where you don't want
1118     to reverse-proxy a subdirectory.</p>
1119
1120 </div>
1121 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1122 <div class="directive-section"><h2><a name="ProxyPassReverse" id="ProxyPassReverse">ProxyPassReverse</a> <a name="proxypassreverse" id="proxypassreverse">Directive</a></h2>
1123 <table class="directive">
1124 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Adjusts the URL in HTTP response headers sent from a reverse
1125 proxied server</td></tr>
1126 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyPassReverse [<var>path</var>] <var>url</var>
1127 [<var>interpolate</var>]</code></td></tr>
1128 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
1129 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1130 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
1131 </table>
1132     <p>This directive lets Apache adjust the URL in the <code>Location</code>,
1133     <code>Content-Location</code> and <code>URI</code> headers on HTTP
1134     redirect responses. This is essential when Apache is used as a
1135     reverse proxy (or gateway) to avoid by-passing the reverse proxy
1136     because of HTTP redirects on the backend servers which stay behind
1137     the reverse proxy.</p>
1138
1139     <p>Only the HTTP response headers specifically mentioned above
1140     will be rewritten.  Apache will not rewrite other response
1141     headers, nor will it rewrite URL references inside HTML pages.
1142     This means that if the proxied content contains absolute URL
1143     references, they will by-pass the proxy.  A third-party module
1144     that will look inside the HTML and rewrite URL references is Nick
1145     Kew's <a href="http://apache.webthing.com/mod_proxy_html/">mod_proxy_html</a>.</p>
1146
1147     <p><var>path</var> is the name of a local virtual path. <var>url</var> is a
1148     partial URL for the remote server - the same way they are used for the
1149     <code class="directive"><a href="#proxypass">ProxyPass</a></code> directive.</p>
1150
1151     <p>For example, suppose the local server has address
1152     <code>http://example.com/</code>; then</p>
1153
1154     <div class="example"><p><code>
1155       ProxyPass         /mirror/foo/ http://backend.example.com/<br />
1156       ProxyPassReverse  /mirror/foo/ http://backend.example.com/<br />
1157       ProxyPassReverseCookieDomain  backend.example.com  public.example.com<br />
1158       ProxyPassReverseCookiePath  /  /mirror/foo/
1159     </code></p></div>
1160
1161     <p>will not only cause a local request for the
1162     <code>http://example.com/mirror/foo/bar</code> to be internally converted
1163     into a proxy request to <code>http://backend.example.com/bar</code>
1164     (the functionality <code>ProxyPass</code> provides here). It also takes care
1165     of redirects the server <code>backend.example.com</code> sends: when
1166     <code>http://backend.example.com/bar</code> is redirected by him to
1167     <code>http://backend.example.com/quux</code> Apache adjusts this to
1168     <code>http://example.com/mirror/foo/quux</code> before forwarding the HTTP
1169     redirect response to the client. Note that the hostname used for
1170     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>
1171
1172     <p>Note that this <code class="directive">ProxyPassReverse</code> directive can
1173     also be used in conjunction with the proxy pass-through feature
1174     (<code>RewriteRule ...  [P]</code>) from <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>
1175     because it doesn't depend on a corresponding <code class="directive"><a href="#proxypass">ProxyPass</a></code> directive.</p>
1176
1177     <p>The optional <var>interpolate</var> keyword (available in
1178     httpd 2.2.9 and later), used together with
1179     <code class="directive">ProxyPassInterpolateEnv</code>, enables interpolation
1180     of environment variables specified using the format <var>${VARNAME}</var>.
1181     </p>
1182
1183     <p>When used inside a <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code> section, the first argument is omitted and the local
1184     directory is obtained from the <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code>.</p>
1185
1186 </div>
1187 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1188 <div class="directive-section"><h2><a name="ProxyPassReverseCookieDomain" id="ProxyPassReverseCookieDomain">ProxyPassReverseCookieDomain</a> <a name="proxypassreversecookiedomain" id="proxypassreversecookiedomain">Directive</a></h2>
1189 <table class="directive">
1190 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Adjusts the Domain string in Set-Cookie headers from a reverse-
1191 proxied server</td></tr>
1192 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyPassReverseCookieDomain <var>internal-domain</var>
1193 <var>public-domain</var> [<var>interpolate</var>]</code></td></tr>
1194 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
1195 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1196 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
1197 </table>
1198 <p>Usage is basically similar to
1199 <code class="directive"><a href="#proxypassreverse">ProxyPassReverse</a></code>, but instead of
1200 rewriting headers that are a URL, this rewrites the <code>domain</code>
1201 string in <code>Set-Cookie</code> headers.</p>
1202
1203 </div>
1204 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1205 <div class="directive-section"><h2><a name="ProxyPassReverseCookiePath" id="ProxyPassReverseCookiePath">ProxyPassReverseCookiePath</a> <a name="proxypassreversecookiepath" id="proxypassreversecookiepath">Directive</a></h2>
1206 <table class="directive">
1207 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Adjusts the Path string in Set-Cookie headers from a reverse-
1208 proxied server</td></tr>
1209 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyPassReverseCookiePath <var>internal-path</var>
1210 <var>public-path</var> [<var>interpolate</var>]</code></td></tr>
1211 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
1212 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1213 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
1214 </table>
1215 <p>Usage is basically similar to
1216 <code class="directive"><a href="#proxypassreverse">ProxyPassReverse</a></code>, but instead of
1217 rewriting headers that are a URL, this rewrites the <code>path</code>
1218 string in <code>Set-Cookie</code> headers.</p>
1219
1220 </div>
1221 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1222 <div class="directive-section"><h2><a name="ProxyPreserveHost" id="ProxyPreserveHost">ProxyPreserveHost</a> <a name="proxypreservehost" id="proxypreservehost">Directive</a></h2>
1223 <table class="directive">
1224 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Use incoming Host HTTP request header for proxy
1225 request</td></tr>
1226 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyPreserveHost On|Off</code></td></tr>
1227 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProxyPreserveHost Off</code></td></tr>
1228 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
1229 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1230 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
1231 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.0.31 and later.</td></tr>
1232 </table>
1233     <p>When enabled, this option will pass the Host: line from the incoming
1234     request to the proxied host, instead of the hostname specified in the
1235     <code class="directive">ProxyPass</code> line.</p>
1236
1237     <p>This option should normally be turned <code>Off</code>. It is mostly 
1238     useful in special configurations like proxied mass name-based virtual
1239     hosting, where the original Host header needs to be evaluated by the
1240     backend server.</p>
1241
1242 </div>
1243 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1244 <div class="directive-section"><h2><a name="ProxyReceiveBufferSize" id="ProxyReceiveBufferSize">ProxyReceiveBufferSize</a> <a name="proxyreceivebuffersize" id="proxyreceivebuffersize">Directive</a></h2>
1245 <table class="directive">
1246 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Network buffer size for proxied HTTP and FTP
1247 connections</td></tr>
1248 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyReceiveBufferSize <var>bytes</var></code></td></tr>
1249 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProxyReceiveBufferSize 0</code></td></tr>
1250 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1251 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1252 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
1253 </table>
1254     <p>The <code class="directive">ProxyReceiveBufferSize</code> directive specifies an
1255     explicit (TCP/IP) network buffer size for proxied HTTP and FTP connections,
1256     for increased throughput. It has to be greater than <code>512</code> or set
1257     to <code>0</code> to indicate that the system's default buffer size should
1258     be used.</p>
1259
1260     <div class="example"><h3>Example</h3><p><code>
1261       ProxyReceiveBufferSize 2048
1262     </code></p></div>
1263
1264 </div>
1265 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1266 <div class="directive-section"><h2><a name="ProxyRemote" id="ProxyRemote">ProxyRemote</a> <a name="proxyremote" id="proxyremote">Directive</a></h2>
1267 <table class="directive">
1268 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Remote proxy used to handle certain requests</td></tr>
1269 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyRemote <var>match</var> <var>remote-server</var></code></td></tr>
1270 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1271 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1272 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
1273 </table>
1274     <p>This defines remote proxies to this proxy. <var>match</var> is either the
1275     name of a URL-scheme that the remote server supports, or a partial URL
1276     for which the remote server should be used, or <code>*</code> to indicate
1277     the server should be contacted for all requests. <var>remote-server</var> is
1278     a partial URL for the remote server. Syntax:</p>
1279
1280     <div class="example"><p><code>
1281       <dfn>remote-server</dfn> =
1282           <var>scheme</var>://<var>hostname</var>[:<var>port</var>]
1283     </code></p></div>
1284
1285     <p><var>scheme</var> is effectively the protocol that should be used to
1286     communicate with the remote server; only <code>http</code> is supported by
1287     this module.</p>
1288
1289     <div class="example"><h3>Example</h3><p><code>
1290       ProxyRemote http://goodguys.example.com/ http://mirrorguys.example.com:8000<br />
1291       ProxyRemote * http://cleverproxy.localdomain<br />
1292       ProxyRemote ftp http://ftpproxy.mydomain:8080
1293     </code></p></div>
1294
1295     <p>In the last example, the proxy will forward FTP requests, encapsulated
1296     as yet another HTTP proxy request, to another proxy which can handle
1297     them.</p>
1298
1299     <p>This option also supports reverse proxy configuration - a backend
1300     webserver can be embedded within a virtualhost URL space even if that
1301     server is hidden by another forward proxy.</p>
1302
1303 </div>
1304 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1305 <div class="directive-section"><h2><a name="ProxyRemoteMatch" id="ProxyRemoteMatch">ProxyRemoteMatch</a> <a name="proxyremotematch" id="proxyremotematch">Directive</a></h2>
1306 <table class="directive">
1307 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Remote proxy used to handle requests matched by regular
1308 expressions</td></tr>
1309 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyRemoteMatch <var>regex</var> <var>remote-server</var></code></td></tr>
1310 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1311 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1312 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
1313 </table>
1314     <p>The <code class="directive">ProxyRemoteMatch</code> is identical to the
1315     <code class="directive"><a href="#proxyremote">ProxyRemote</a></code> directive, except the
1316     first argument is a <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular expression</a>
1317     match against the requested URL.</p>
1318
1319 </div>
1320 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1321 <div class="directive-section"><h2><a name="ProxyRequests" id="ProxyRequests">ProxyRequests</a> <a name="proxyrequests" id="proxyrequests">Directive</a></h2>
1322 <table class="directive">
1323 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enables forward (standard) proxy requests</td></tr>
1324 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyRequests On|Off</code></td></tr>
1325 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProxyRequests Off</code></td></tr>
1326 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1327 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1328 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
1329 </table>
1330     <p>This allows or prevents Apache from functioning as a forward proxy
1331     server. (Setting ProxyRequests to <code>Off</code> does not disable use of
1332     the <code class="directive"><a href="#proxypass">ProxyPass</a></code> directive.)</p>
1333
1334     <p>In a typical reverse proxy or gateway configuration, this
1335     option should be set to
1336     <code>Off</code>.</p>
1337
1338     <p>In order to get the functionality of proxying HTTP or FTP sites, you
1339     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>
1340     (or both) present in the server.</p>
1341
1342     <div class="warning"><h3>Warning</h3>
1343       <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
1344       both to your network and to the Internet at large.</p>
1345     </div>
1346
1347 <h3>See also</h3>
1348 <ul>
1349 <li><a href="#forwardreverse">Forward and Reverse Proxies/Gateways</a></li>
1350 </ul>
1351 </div>
1352 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1353 <div class="directive-section"><h2><a name="ProxySet" id="ProxySet">ProxySet</a> <a name="proxyset" id="proxyset">Directive</a></h2>
1354 <table class="directive">
1355 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Set various Proxy balancer or member parameters</td></tr>
1356 <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>
1357 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
1358 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1359 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
1360 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>ProxySet is only available in Apache 2.2
1361   and later.</td></tr>
1362 </table>
1363     <p>This directive is used as an alternate method of setting any of the
1364     parameters available to Proxy balancers and workers normally done via the
1365     <code class="directive"><a href="#proxypass">ProxyPass</a></code> directive. If used
1366     within a <code>&lt;Proxy <var>balancer url|worker url</var>&gt;</code>
1367     container directive, the <var>url</var> argument is not required. As a side
1368     effect the respective balancer or worker gets created. This can be useful
1369     when doing reverse proxying via a
1370     <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> instead of a
1371     <code class="directive"><a href="#proxypass">ProxyPass</a></code> directive.</p>
1372
1373     <div class="example"><p><code>
1374       &lt;Proxy balancer://hotcluster&gt;<br />
1375       <span class="indent">
1376         BalancerMember http://www2.example.com:8009 loadfactor=1<br />
1377         BalancerMember http://www3.example.com:8009 loadfactor=2<br />
1378         ProxySet lbmethod=bytraffic<br />
1379       </span>
1380       &lt;/Proxy&gt;
1381     </code></p></div>
1382
1383     <div class="example"><p><code>
1384       &lt;Proxy http://backend&gt;<br />
1385       <span class="indent">
1386         ProxySet keepalive=On<br />
1387       </span>
1388       &lt;/Proxy&gt;
1389     </code></p></div>
1390
1391     <div class="example"><p><code>
1392         ProxySet balancer://foo lbmethod=bytraffic timeout=15
1393     </code></p></div>
1394
1395     <div class="example"><p><code>
1396         ProxySet ajp://backend:7001 timeout=15
1397     </code></p></div>
1398
1399    <div class="warning"><h3>Warning</h3>
1400       <p>Keep in mind that the same parameter key can have a different meaning
1401       depending whether it is applied to a balancer or a worker as shown by the two
1402       examples above regarding timeout.</p>
1403    </div>
1404
1405
1406 </div>
1407 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1408 <div class="directive-section"><h2><a name="ProxyStatus" id="ProxyStatus">ProxyStatus</a> <a name="proxystatus" id="proxystatus">Directive</a></h2>
1409 <table class="directive">
1410 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Show Proxy LoadBalancer status in mod_status</td></tr>
1411 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyStatus Off|On|Full</code></td></tr>
1412 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProxyStatus Off</code></td></tr>
1413 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1414 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1415 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
1416 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.2 and later</td></tr>
1417 </table>
1418     <p>This directive determines whether or not proxy
1419     loadbalancer status data is displayed via the <code class="module"><a href="../mod/mod_status.html">mod_status</a></code>
1420     server-status page.</p>
1421     <div class="note"><h3>Note</h3>
1422       <p><strong>Full</strong> is synonymous with <strong>On</strong></p>
1423     </div>
1424
1425
1426 </div>
1427 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1428 <div class="directive-section"><h2><a name="ProxyTimeout" id="ProxyTimeout">ProxyTimeout</a> <a name="proxytimeout" id="proxytimeout">Directive</a></h2>
1429 <table class="directive">
1430 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Network timeout for proxied requests</td></tr>
1431 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyTimeout <var>seconds</var></code></td></tr>
1432 <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>
1433 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1434 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1435 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
1436 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.0.31 and later</td></tr>
1437 </table>
1438     <p>This directive allows a user to specifiy a timeout on proxy requests.
1439     This is useful when you have a slow/buggy appserver which hangs, and you
1440     would rather just return a timeout and fail gracefully instead of waiting
1441     however long it takes the server to return.</p>
1442
1443 </div>
1444 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1445 <div class="directive-section"><h2><a name="ProxyVia" id="ProxyVia">ProxyVia</a> <a name="proxyvia" id="proxyvia">Directive</a></h2>
1446 <table class="directive">
1447 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Information provided in the <code>Via</code> HTTP response
1448 header for proxied requests</td></tr>
1449 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxyVia On|Off|Full|Block</code></td></tr>
1450 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProxyVia Off</code></td></tr>
1451 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1452 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1453 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
1454 </table>
1455     <p>This directive controls the use of the <code>Via:</code> HTTP
1456     header by the proxy. Its intended use is to control the flow of
1457     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
1458     14.45 for an explanation of <code>Via:</code> header lines.</p>
1459
1460     <ul>
1461     <li>If set to <code>Off</code>, which is the default, no special processing
1462     is performed. If a request or reply contains a <code>Via:</code> header,
1463     it is passed through unchanged.</li>
1464
1465     <li>If set to <code>On</code>, each request and reply will get a
1466     <code>Via:</code> header line added for the current host.</li>
1467
1468     <li>If set to <code>Full</code>, each generated <code>Via:</code> header
1469     line will additionally have the Apache server version shown as a
1470     <code>Via:</code> comment field.</li>
1471
1472     <li>If set to <code>Block</code>, every proxy request will have all its
1473     <code>Via:</code> header lines removed. No new <code>Via:</code> header will
1474     be generated.</li>
1475     </ul>
1476
1477 </div>
1478 </div>
1479 <div class="bottomlang">
1480 <p><span>Available Languages: </span><a href="../en/mod/mod_proxy.html" title="English">&nbsp;en&nbsp;</a> |
1481 <a href="../fr/mod/mod_proxy.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
1482 <a href="../ja/mod/mod_proxy.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a></p>
1483 </div><div id="footer">
1484 <p class="apache">Copyright 2009 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>
1485 <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>
1486 </body></html>