]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_proxy.xml
ye gods what have I done
[apache] / docs / manual / mod / mod_proxy.xml
1 <?xml version="1.0"?>
2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
5
6 <!--
7  Licensed to the Apache Software Foundation (ASF) under one or more
8  contributor license agreements.  See the NOTICE file distributed with
9  this work for additional information regarding copyright ownership.
10  The ASF licenses this file to You under the Apache License, Version 2.0
11  (the "License"); you may not use this file except in compliance with
12  the License.  You may obtain a copy of the License at
13
14      http://www.apache.org/licenses/LICENSE-2.0
15
16  Unless required by applicable law or agreed to in writing, software
17  distributed under the License is distributed on an "AS IS" BASIS,
18  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  See the License for the specific language governing permissions and
20  limitations under the License.
21 -->
22
23 <modulesynopsis metafile="mod_proxy.xml.meta">
24
25 <name>mod_proxy</name>
26 <description>Multi-protocol proxy/gateway server</description>
27 <status>Extension</status>
28 <sourcefile>mod_proxy.c</sourcefile>
29 <identifier>proxy_module</identifier>
30
31 <summary>
32     <note type="warning"><title>Warning</title>
33       <p>Do not enable proxying with <directive module="mod_proxy"
34       >ProxyRequests</directive> until you have <a href="#access"
35       >secured your server</a>. Open proxy servers are dangerous both to your
36       network and to the Internet at large.</p>
37     </note>
38
39     <p><module>mod_proxy</module> and related modules implement a
40     proxy/gateway for Apache HTTP Server, supporting a number of popular
41     protocols as well as several different load balancing algorithms.
42     Third-party modules can add support for additional protocols and
43     load balancing algorithms.</p>
44
45     <p>A set of modules must be loaded into the server to provide the
46     necessary features.  These modules can be included statically at
47     build time or dynamically via the
48     <directive module="mod_so">LoadModule</directive> directive).
49     The set must include:</p>
50
51     <ul>
52       <li><module>mod_proxy</module>, which provides basic proxy
53       capabilities</li>
54
55       <li><module>mod_proxy_balancer</module> and one or more
56       balancer modules, if load balancing is required.  (See
57       <module>mod_proxy_balancer</module> for more information.)</li>
58
59       <li>one or more proxy scheme, or protocol, modules:
60
61         <table border="1">
62         <tr><th>Protocol</th><th>Module</th></tr>
63         <tr><td>AJP13 (Apache JServe Protocol version
64           1.3)</td><td><module>mod_proxy_ajp</module></td></tr>
65         <tr><td>CONNECT (for
66           SSL)</td><td><module>mod_proxy_connect</module></td></tr>
67         <tr><td>FastCGI</td><td><module>mod_proxy_fcgi</module></td></tr>
68         <tr><td>ftp</td><td><module>mod_proxy_ftp</module></td></tr>
69         <tr><td>HTTP/0.9, HTTP/1.0, and
70           HTTP/1.1</td><td><module>mod_proxy_http</module></td></tr>
71         <tr><td>SCGI</td><td><module>mod_proxy_scgi</module></td></tr>
72         </table>
73       </li>
74     </ul>
75
76     <p>In addition, extended features are provided by other modules.
77     Caching is provided by <module>mod_cache</module> and related
78     modules.  The ability to contact remote servers using the SSL/TLS
79     protocol is provided by the <code>SSLProxy*</code> directives of
80     <module>mod_ssl</module>.  These additional modules will need
81     to be loaded and configured to take advantage of these features.</p>
82 </summary>
83 <seealso><module>mod_cache</module></seealso>
84 <seealso><module>mod_proxy_ajp</module></seealso>
85 <seealso><module>mod_proxy_connect</module></seealso>
86 <seealso><module>mod_proxy_fcgi</module></seealso>
87 <seealso><module>mod_proxy_ftp</module></seealso>
88 <seealso><module>mod_proxy_http</module></seealso>
89 <seealso><module>mod_proxy_scgi</module></seealso>
90 <seealso><module>mod_proxy_balancer</module></seealso>
91 <seealso><module>mod_ssl</module></seealso>
92
93     <section id="forwardreverse"><title>Forward Proxies and Reverse
94        Proxies/Gateways</title>
95       <p>Apache HTTP Server can be configured in both a <dfn>forward</dfn> and
96       <dfn>reverse</dfn> proxy (also known as <dfn>gateway</dfn>) mode.</p>
97
98       <p>An ordinary <dfn>forward proxy</dfn> is an intermediate
99       server that sits between the client and the <em>origin
100       server</em>.  In order to get content from the origin server,
101       the client sends a request to the proxy naming the origin server
102       as the target and the proxy then requests the content from the
103       origin server and returns it to the client.  The client must be
104       specially configured to use the forward proxy to access other
105       sites.</p>
106
107       <p>A typical usage of a forward proxy is to provide Internet
108       access to internal clients that are otherwise restricted by a
109       firewall.  The forward proxy can also use caching (as provided
110       by <module>mod_cache</module>) to reduce network usage.</p>
111
112       <p>The forward proxy is activated using the <directive
113       module="mod_proxy">ProxyRequests</directive> directive.  Because
114       forward proxies allow clients to access arbitrary sites through
115       your server and to hide their true origin, it is essential that
116       you <a href="#access">secure your server</a> so that only
117       authorized clients can access the proxy before activating a
118       forward proxy.</p>
119
120       <p>A <dfn>reverse proxy</dfn> (or <dfn>gateway</dfn>), by
121       contrast, appears to the client just like an ordinary web
122       server.  No special configuration on the client is necessary.
123       The client makes ordinary requests for content in the name-space
124       of the reverse proxy.  The reverse proxy then decides where to
125       send those requests, and returns the content as if it was itself
126       the origin.</p>
127
128       <p>A typical usage of a reverse proxy is to provide Internet
129       users access to a server that is behind a firewall.  Reverse
130       proxies can also be used to balance load among several back-end
131       servers, or to provide caching for a slower back-end server.
132       In addition, reverse proxies can be used simply to bring
133       several servers into the same URL space.</p>
134
135       <p>A reverse proxy is activated using the <directive
136       module="mod_proxy">ProxyPass</directive> directive or the
137       <code>[P]</code> flag to the <directive
138       module="mod_rewrite">RewriteRule</directive> directive.  It is
139       <strong>not</strong> necessary to turn <directive
140       module="mod_proxy">ProxyRequests</directive> on in order to
141       configure a reverse proxy.</p>
142     </section> <!-- /forwardreverse -->
143
144     <section id="examples"><title>Basic Examples</title>
145
146     <p>The examples below are only a very basic idea to help you
147     get started.  Please read the documentation on the individual
148     directives.</p>
149
150     <p>In addition, if you wish to have caching enabled, consult
151     the documentation from <module>mod_cache</module>.</p>
152
153     <example><title>Reverse Proxy</title>
154     <highlight language="config">
155 ProxyPass /foo http://foo.example.com/bar
156 ProxyPassReverse /foo http://foo.example.com/bar
157     </highlight>
158     </example>
159
160     <example><title>Forward Proxy</title>
161     <highlight language="config">
162 ProxyRequests On
163 ProxyVia On
164
165 &lt;Proxy *&gt;
166   Require host internal.example.com
167 &lt;/Proxy&gt;
168     </highlight>
169     </example>
170     </section> <!-- /examples -->
171
172
173     <section id="workers"><title>Workers</title>
174       <p>The proxy manages the configuration of origin servers and their
175       communication parameters in objects called <dfn>workers</dfn>.
176       There are two built-in workers, the default forward proxy worker and the
177       default reverse proxy worker. Additional workers can be configured
178       explicitly.</p>
179
180       <p>The two default workers have a fixed configuration
181       and will be used if no other worker matches the request.
182       They do not use HTTP Keep-Alive or connection pooling.
183       The TCP connections to the origin server will instead be
184       opened and closed for each request.</p>
185
186       <p>Explicitly configured workers are identified by their URL.
187       They are usually created and configured using
188       <directive module="mod_proxy">ProxyPass</directive> or
189       <directive module="mod_proxy">ProxyPassMatch</directive> when used
190       for a reverse proxy:</p>
191
192       <highlight language="config">
193           ProxyPass /example http://backend.example.com connectiontimeout=5 timeout=30
194       </highlight>
195
196       <p>This will create a worker associated with the origin server URL
197       <code>http://backend.example.com</code> and using the given timeout
198       values. When used in a forward proxy, workers are usually defined
199       via the <directive module="mod_proxy">ProxySet</directive> directive:</p>
200
201       <highlight language="config">
202           ProxySet http://backend.example.com connectiontimeout=5 timeout=30
203       </highlight>
204
205       <p>or alternatively using <directive module="mod_proxy">Proxy</directive>
206       and <directive module="mod_proxy">ProxySet</directive>:</p>
207
208       <highlight language="config">
209 &lt;Proxy http://backend.example.com&gt;
210   ProxySet connectiontimeout=5 timeout=30
211 &lt;/Proxy&gt;
212       </highlight>
213
214       <p>Using explicitly configured workers in the forward mode is
215       not very common, because forward proxies usually communicate with many
216       different origin servers. Creating explicit workers for some of the
217       origin servers can still be useful, if they are used very often.
218       Explicitly configured workers have no concept of forward or reverse
219       proxying by themselves. They encapsulate a common concept of
220       communication with origin servers. A worker created by
221       <directive module="mod_proxy">ProxyPass</directive> for use in a
222       reverse proxy will be also used for forward proxy requests whenever
223       the URL to the origin server matches the worker URL and vice versa.</p>
224
225       <p>The URL identifying a direct worker is the URL of its
226       origin server including any path components given:</p>
227
228      <highlight language="config">
229 ProxyPass /examples http://backend.example.com/examples
230 ProxyPass /docs http://backend.example.com/docs
231       </highlight>
232
233       <p>This example defines two different workers, each using a separate
234       connection pool and configuration.</p>
235
236       <note type="warning"><title>Worker Sharing</title>
237         <p>Worker sharing happens if the worker URLs overlap, which occurs when
238         the URL of some worker is a leading substring of the URL of another
239         worker defined later in the configuration file. In the following example</p>
240
241         <highlight language="config">
242 ProxyPass /apps http://backend.example.com/ timeout=60
243 ProxyPass /examples http://backend.example.com/examples timeout=10
244         </highlight>
245
246         <p>the second worker isn't actually created. Instead the first
247         worker is used. The benefit is, that there is only one connection pool,
248         so connections are more often reused. Note that all configuration attributes
249         given explicitly for the later worker will be ignored. This will be logged
250         as a warning. In the above example the resulting timeout value
251         for the URL <code>/examples</code> will be <code>60</code> instead
252         of <code>10</code>!</p>
253
254         <p>If you want to avoid worker sharing, sort your worker definitions
255         by URL length, starting with the longest worker URLs. If you want to maximize
256         worker sharing use the reverse sort order. See also the related warning about
257         ordering <directive module="mod_proxy">ProxyPass</directive> directives.</p>
258
259       </note> <!-- /worker_sharing -->
260
261       <p>Explicitly configured workers come in two flavors:
262       <dfn>direct workers</dfn> and <dfn>(load) balancer workers</dfn>.
263       They support many important configuration attributes which are
264       described below in the <directive module="mod_proxy">ProxyPass</directive>
265       directive. The same attributes can also be set using
266       <directive module="mod_proxy">ProxySet</directive>.</p>
267
268       <p>The set of options available for a direct worker
269       depends on the protocol, which is specified in the origin server URL.
270       Available protocols include <code>ajp</code>, <code>fcgi</code>,
271       <code>ftp</code>, <code>http</code> and <code>scgi</code>.</p>
272
273       <p>Balancer workers are virtual workers that use direct workers known
274       as their members to actually handle the requests. Each balancer can
275       have multiple members. When it handles a request, it chooses a member
276       based on the configured load balancing algorithm.</p>
277
278       <p>A balancer worker is created if its worker URL uses
279       <code>balancer</code> as the protocol scheme.
280       The balancer URL uniquely identifies the balancer worker.
281       Members are added to a balancer using
282       <directive module="mod_proxy">BalancerMember</directive>.</p>
283
284     </section> <!-- /workers -->
285
286     <section id="access"><title>Controlling access to your proxy</title>
287       <p>You can control who can access your proxy via the <directive
288       module="mod_proxy" type="section">Proxy</directive> control block as in
289       the following example:</p>
290
291       <highlight language="config">
292 &lt;Proxy *&gt;
293   Require ip 192.168.0
294 &lt;/Proxy&gt;
295       </highlight>
296
297       <p>For more information on access control directives, see
298       <module>mod_authz_host</module>.</p>
299
300       <p>Strictly limiting access is essential if you are using a
301       forward proxy (using the <directive
302       module="mod_proxy">ProxyRequests</directive> directive).
303       Otherwise, your server can be used by any client to access
304       arbitrary hosts while hiding his or her true identity.  This is
305       dangerous both for your network and for the Internet at large.
306       When using a reverse proxy (using the <directive
307       module="mod_proxy">ProxyPass</directive> directive with
308       <code>ProxyRequests Off</code>), access control is less
309       critical because clients can only contact the hosts that you
310       have specifically configured.</p>
311
312       <p><strong>See Also</strong> the <a href="mod_proxy_http.html#env"
313       >Proxy-Chain-Auth</a> environment variable.</p>
314
315     </section> <!-- /access -->
316
317     <section id="startup"><title>Slow Startup</title>
318       <p>If you're using the <directive module="mod_proxy"
319       >ProxyBlock</directive> directive, hostnames' IP addresses are looked up
320       and cached during startup for later match test. This may take a few
321       seconds (or more) depending on the speed with which the hostname lookups
322       occur.</p>
323     </section> <!-- /startup -->
324
325     <section id="intranet"><title>Intranet Proxy</title>
326       <p>An Apache httpd proxy server situated in an intranet needs to forward
327       external requests through the company's firewall (for this, configure
328       the <directive module="mod_proxy">ProxyRemote</directive> directive
329       to forward the respective <var>scheme</var> to the firewall proxy).
330       However, when it has to
331       access resources within the intranet, it can bypass the firewall when
332       accessing hosts. The <directive module="mod_proxy">NoProxy</directive>
333       directive is useful for specifying which hosts belong to the intranet and
334       should be accessed directly.</p>
335
336       <p>Users within an intranet tend to omit the local domain name from their
337       WWW requests, thus requesting "http://somehost/" instead of
338       <code>http://somehost.example.com/</code>. Some commercial proxy servers
339       let them get away with this and simply serve the request, implying a
340       configured local domain. When the <directive module="mod_proxy"
341       >ProxyDomain</directive> directive is used and the server is <a
342       href="#proxyrequests">configured for proxy service</a>, Apache httpd can return
343       a redirect response and send the client to the correct, fully qualified,
344       server address. This is the preferred method since the user's bookmark
345       files will then contain fully qualified hosts.</p>
346     </section> <!-- /intranet -->
347
348     <section id="envsettings"><title>Protocol Adjustments</title>
349       <p>For circumstances where <module>mod_proxy</module> is sending
350       requests to an origin server that doesn't properly implement
351       keepalives or HTTP/1.1, there are two <a
352       href="../env.html">environment variables</a> that can force the
353       request to use HTTP/1.0 with no keepalive. These are set via the
354       <directive module="mod_env">SetEnv</directive> directive.</p>
355
356       <p>These are the <code>force-proxy-request-1.0</code> and
357       <code>proxy-nokeepalive</code> notes.</p>
358
359       <highlight language="config">
360 &lt;Location /buggyappserver/&gt;
361   ProxyPass http://buggyappserver:7001/foo/
362   SetEnv force-proxy-request-1.0 1
363   SetEnv proxy-nokeepalive 1
364 &lt;/Location&gt;
365         </highlight>
366
367     </section> <!-- /envsettings -->
368
369     <section id="request-bodies"><title>Request Bodies</title>
370
371     <p>Some request methods such as POST include a request body.
372     The HTTP protocol requires that requests which include a body
373     either use chunked transfer encoding or send a
374     <code>Content-Length</code> request header.  When passing these
375     requests on to the origin server, <module>mod_proxy_http</module>
376     will always attempt to send the <code>Content-Length</code>.  But
377     if the body is large and the original request used chunked
378     encoding, then chunked encoding may also be used in the upstream
379     request.  You can control this selection using <a
380     href="../env.html">environment variables</a>.  Setting
381     <code>proxy-sendcl</code> ensures maximum compatibility with
382     upstream servers by always sending the
383     <code>Content-Length</code>, while setting
384     <code>proxy-sendchunked</code> minimizes resource usage by using
385     chunked encoding.</p>
386
387     <p>Under some circumstances, the server must spool request bodies
388     to disk to satisfy the requested handling of request bodies.  For
389     example, this spooling will occur if the original body was sent with
390     chunked encoding (and is large), but the administrator has
391     asked for backend requests to be sent with Content-Length or as HTTP/1.0.
392     This spooling can also occur if the request body already has a
393     Content-Length header, but the server is configured to filter incoming
394     request bodies.</p>
395
396     <p><directive module="core">LimitRequestBody</directive> only applies to
397     request bodies that the server will spool to disk</p>
398
399     </section> <!-- /request-bodies -->
400
401     <section id="x-headers"><title>Reverse Proxy Request Headers</title>
402
403     <p>When acting in a reverse-proxy mode (using the <directive
404     module="mod_proxy">ProxyPass</directive> directive, for example),
405     <module>mod_proxy_http</module> adds several request headers in
406     order to pass information to the origin server. These headers
407     are:</p>
408
409     <dl>
410       <dt><code>X-Forwarded-For</code></dt>
411       <dd>The IP address of the client.</dd>
412       <dt><code>X-Forwarded-Host</code></dt>
413       <dd>The original host requested by the client in the <code>Host</code>
414        HTTP request header.</dd>
415       <dt><code>X-Forwarded-Server</code></dt>
416       <dd>The hostname of the proxy server.</dd>
417     </dl>
418
419     <p>Be careful when using these headers on the origin server, since
420     they will contain more than one (comma-separated) value if the
421     original request already contained one of these headers. For
422     example, you can use <code>%{X-Forwarded-For}i</code> in the log
423     format string of the origin server to log the original clients IP
424     address, but you may get more than one address if the request
425     passes through several proxies.</p>
426
427     <p>See also the <directive
428     module="mod_proxy">ProxyPreserveHost</directive> and <directive
429     module="mod_proxy">ProxyVia</directive> directives, which control
430     other request headers.</p>
431
432    </section> <!--/x-headers -->
433
434
435 <directivesynopsis type="section">
436 <name>Proxy</name>
437 <description>Container for directives applied to proxied resources</description>
438 <syntax>&lt;Proxy <var>wildcard-url</var>&gt; ...&lt;/Proxy&gt;</syntax>
439 <contextlist><context>server config</context><context>virtual host</context>
440 </contextlist>
441
442 <usage>
443     <p>Directives placed in <directive type="section">Proxy</directive>
444     sections apply only to matching proxied content.  Shell-style wildcards are
445     allowed.</p>
446
447     <p>For example, the following will allow only hosts in
448     <code>yournetwork.example.com</code> to access content via your proxy
449     server:</p>
450
451     <highlight language="config">
452 &lt;Proxy *&gt;
453   Require host yournetwork.example.com
454 &lt;/Proxy&gt;
455     </highlight>
456
457     <p>The following example will process all files in the <code>foo</code>
458     directory of <code>example.com</code> through the <code>INCLUDES</code>
459     filter when they are sent through the proxy server:</p>
460
461    <highlight language="config">    
462 &lt;Proxy http://example.com/foo/*&gt;
463   SetOutputFilter INCLUDES
464 &lt;/Proxy&gt;
465     </highlight>
466
467 </usage>
468 <seealso><directive type="section" module="mod_proxy">ProxyMatch</directive></seealso>
469 </directivesynopsis>
470
471 <directivesynopsis>
472 <name>ProxyBadHeader</name>
473 <description>Determines how to handle bad header lines in a
474 response</description>
475 <syntax>ProxyBadHeader IsError|Ignore|StartBody</syntax>
476 <default>ProxyBadHeader IsError</default>
477 <contextlist><context>server config</context><context>virtual host</context>
478 </contextlist>
479
480 <usage>
481     <p>The <directive>ProxyBadHeader</directive> directive determines the
482     behaviour of <module>mod_proxy</module> if it receives syntactically invalid
483     response header lines (<em>i.e.</em> containing no colon) from the origin
484     server. The following arguments are possible:</p>
485
486     <dl>
487     <dt><code>IsError</code></dt>
488     <dd>Abort the request and end up with a 502 (Bad Gateway) response. This is
489     the default behaviour.</dd>
490
491     <dt><code>Ignore</code></dt>
492     <dd>Treat bad header lines as if they weren't sent.</dd>
493
494     <dt><code>StartBody</code></dt>
495     <dd>When receiving the first bad header line, finish reading the headers and
496     treat the remainder as body. This helps to work around buggy backend servers
497     which forget to insert an empty line between the headers and the body.</dd>
498     </dl>
499 </usage>
500 </directivesynopsis>
501
502 <directivesynopsis type="section">
503 <name>ProxyMatch</name>
504 <description>Container for directives applied to regular-expression-matched
505 proxied resources</description>
506 <syntax>&lt;ProxyMatch <var>regex</var>&gt; ...&lt;/ProxyMatch&gt;</syntax>
507 <contextlist><context>server config</context><context>virtual host</context>
508 </contextlist>
509
510 <usage>
511     <p>The <directive type="section">ProxyMatch</directive> directive is
512     identical to the <directive module="mod_proxy"
513     type="section">Proxy</directive> directive, except it matches URLs
514     using <glossary ref="regex">regular expressions</glossary>.</p>
515 </usage>
516 <seealso><directive type="section" module="mod_proxy">Proxy</directive></seealso>
517 </directivesynopsis>
518
519 <directivesynopsis>
520 <name>ProxyPreserveHost</name>
521 <description>Use incoming Host HTTP request header for proxy
522 request</description>
523 <syntax>ProxyPreserveHost On|Off</syntax>
524 <default>ProxyPreserveHost Off</default>
525 <contextlist><context>server config</context><context>virtual host</context>
526 <context>directory</context>
527 </contextlist>
528 <compatibility>Usable in directory
529 context in 2.3.3 and later.</compatibility>
530
531 <usage>
532     <p>When enabled, this option will pass the Host: line from the incoming
533     request to the proxied host, instead of the hostname specified in the
534     <directive>ProxyPass</directive> line.</p>
535
536     <p>This option should normally be turned <code>Off</code>. It is mostly
537     useful in special configurations like proxied mass name-based virtual
538     hosting, where the original Host header needs to be evaluated by the
539     backend server.</p>
540 </usage>
541 </directivesynopsis>
542
543 <directivesynopsis>
544 <name>ProxyRequests</name>
545 <description>Enables forward (standard) proxy requests</description>
546 <syntax>ProxyRequests On|Off</syntax>
547 <default>ProxyRequests Off</default>
548 <contextlist><context>server config</context><context>virtual host</context>
549 </contextlist>
550
551 <usage>
552     <p>This allows or prevents Apache httpd from functioning as a forward proxy
553     server. (Setting ProxyRequests to <code>Off</code> does not disable use of
554     the <directive module="mod_proxy">ProxyPass</directive> directive.)</p>
555
556     <p>In a typical reverse proxy or gateway configuration, this
557     option should be set to
558     <code>Off</code>.</p>
559
560     <p>In order to get the functionality of proxying HTTP or FTP sites, you
561     need also <module>mod_proxy_http</module> or <module>mod_proxy_ftp</module>
562     (or both) present in the server.</p>
563
564     <p>In order to get the functionality of (forward) proxying HTTPS sites, you
565     need <module>mod_proxy_connect</module> enabled in the server.</p>
566
567     <note type="warning"><title>Warning</title>
568       <p>Do not enable proxying with <directive
569       module="mod_proxy">ProxyRequests</directive> until you have <a
570       href="#access">secured your server</a>.  Open proxy servers are dangerous
571       both to your network and to the Internet at large.</p>
572     </note>
573 </usage>
574 <seealso><a href="#forwardreverse">Forward and Reverse Proxies/Gateways</a></seealso>
575 </directivesynopsis>
576
577 <directivesynopsis>
578 <name>ProxyRemote</name>
579 <description>Remote proxy used to handle certain requests</description>
580 <syntax>ProxyRemote <var>match</var> <var>remote-server</var></syntax>
581 <contextlist><context>server config</context><context>virtual host</context>
582 </contextlist>
583
584 <usage>
585     <p>This defines remote proxies to this proxy. <var>match</var> is either the
586     name of a URL-scheme that the remote server supports, or a partial URL
587     for which the remote server should be used, or <code>*</code> to indicate
588     the server should be contacted for all requests. <var>remote-server</var> is
589     a partial URL for the remote server. Syntax:</p>
590
591     <example>
592       <dfn>remote-server</dfn> =
593           <var>scheme</var>://<var>hostname</var>[:<var>port</var>]
594     </example>
595
596     <p><var>scheme</var> is effectively the protocol that should be used to
597     communicate with the remote server; only <code>http</code> and <code>https</code>
598     are supported by this module. When using <code>https</code>, the requests
599     are forwarded through the remote proxy using the HTTP CONNECT method.</p>
600
601     <example><title>Example</title>
602     <highlight language="config">
603 ProxyRemote http://goodguys.example.com/ http://mirrorguys.example.com:8000
604 ProxyRemote * http://cleverproxy.localdomain
605 ProxyRemote ftp http://ftpproxy.mydomain:8080
606     </highlight>
607     </example>
608
609     <p>In the last example, the proxy will forward FTP requests, encapsulated
610     as yet another HTTP proxy request, to another proxy which can handle
611     them.</p>
612
613     <p>This option also supports reverse proxy configuration - a backend
614     webserver can be embedded within a virtualhost URL space even if that
615     server is hidden by another forward proxy.</p>
616 </usage>
617 </directivesynopsis>
618
619 <directivesynopsis>
620 <name>ProxyRemoteMatch</name>
621 <description>Remote proxy used to handle requests matched by regular
622 expressions</description>
623 <syntax>ProxyRemoteMatch <var>regex</var> <var>remote-server</var></syntax>
624 <contextlist><context>server config</context><context>virtual host</context>
625 </contextlist>
626
627 <usage>
628     <p>The <directive>ProxyRemoteMatch</directive> is identical to the
629     <directive module="mod_proxy">ProxyRemote</directive> directive, except the
630     first argument is a <glossary ref="regex">regular expression</glossary>
631     match against the requested URL.</p>
632 </usage>
633 </directivesynopsis>
634
635 <directivesynopsis>
636 <name>BalancerGrowth</name>
637 <description>Number of additional Balancers that can be added Post-configuration</description>
638     <syntax>BalancerGrowth <var>#</var></syntax>
639     <default>BalancerGrowth 5</default>
640     <contextlist><context>server config</context><context>virtual host</context></contextlist>
641 <compatibility>BalancerGrowth is only available in Apache HTTP Server 2.3.13
642   and later.</compatibility>
643 <usage>
644     <p>This directive allows for growth potential in the number of
645     Balancers available for a virtualhost in addition to the
646     number pre-configured. It only takes effect if there is at
647     least 1 pre-configured Balancer.</p>
648 </usage>
649 </directivesynopsis>
650
651 <directivesynopsis>
652     <name>BalancerPersist</name>
653     <description>Attempt to persist changes made by the Balancer Manager across restarts.</description>
654     <syntax>BalancerPersist On|Off</syntax>
655     <default>BalancerPersist Off</default>
656     <contextlist><context>server config</context><context>virtual host</context></contextlist>
657     <compatibility>BalancerPersist is only available in Apache HTTP Server 2.5.0
658         and later.</compatibility>
659     <usage>
660         <p>This directive will cause the shared memory storage associated
661         with the balancers and balancer members to be persisted across
662         restarts. This allows these local changes to not be lost during the
663         normal restart/graceful state transitions.</p>
664     </usage>
665 </directivesynopsis>
666
667 <directivesynopsis>
668     <name>ProxyPassInherit</name>
669     <description>Inherit ProxyPass directives defined from the main server</description>
670     <syntax>ProxyPassInherit On|Off</syntax>
671     <default>ProxyPassInherit On</default>
672     <contextlist><context>server config</context><context>virtual host</context></contextlist>
673     <compatibility>ProxyPassInherit is only available in Apache HTTP Server 2.5.0 and later.
674         and later.</compatibility>
675     <usage>
676         <p>This directive will cause the current server/vhost to "inherit"
677             <directive module="mod_proxy">ProxyPass</directive>
678             directives defined in the main server. This can cause issues and
679             inconsistent behavior if using the Balancer Manager for dynamic changes
680             and so should be disabled if using that feature.</p>
681         <p>The setting in the global server defines the default for all vhosts.</p>
682         <p>Disabling ProxyPassInherit also disables <directive module="mod_proxy">BalancerInherit</directive>.</p>
683     </usage>
684 </directivesynopsis>
685
686 <directivesynopsis>
687     <name>BalancerInherit</name>
688     <description>Inherit proxy Balancers/Workers defined from the main server</description>
689     <syntax>BalancerInherit On|Off</syntax>
690     <default>BalancerInherit On</default>
691     <contextlist><context>server config</context><context>virtual host</context></contextlist>
692     <compatibility>BalancerInherit is only available in Apache HTTP Server 2.4.4 and later.
693         and later.</compatibility>
694     <usage>
695         <p>This directive will cause the current server/vhost to "inherit"
696             Balancers and Workers defined in the main server. This can cause issues and
697             inconsistent behavior if using the Balancer Manager for dynamic changes
698             and so should be disabled if using that feature.</p>
699         <p>The setting in the global server defines the default for all vhosts.</p>
700         <p>Disabling <directive module="mod_proxy">ProxyPassInherit</directive> also disables BalancerInherit.</p>
701     </usage>
702 </directivesynopsis>
703
704 <directivesynopsis>
705     <name>BalancerMember</name>
706     <description>Add a member to a load balancing group</description>
707     <syntax>BalancerMember [<var>balancerurl</var>] <var>url</var> [<var
708         >key=value [key=value ...]]</var></syntax>
709     <contextlist><context>directory</context>
710     </contextlist>
711     <usage>
712         <p>This directive adds a member to a load balancing group. It could be used
713             within a <code>&lt;Proxy <var>balancer://</var>...&gt;</code> container
714             directive, and can take any of the key value pair parameters available to
715             <directive module="mod_proxy">ProxyPass</directive> directives.</p>
716         <p>One additional parameter is available only to <directive
717             module="mod_proxy">BalancerMember</directive> directives:
718             <var>loadfactor</var>. This is the member load factor - a number between 1
719             (default) and 100, which defines the weighted load to be applied to the
720             member in question.</p>
721         <p>The balancerurl is only needed when not in <code>&lt;Proxy <var>balancer://</var>...&gt;</code>
722             container directive. It corresponds to the url of a balancer defined in
723             <directive module="mod_proxy">ProxyPass</directive> directive.</p>
724         <p>The path component of the balancer URL in any
725             <code>&lt;Proxy <var>balancer://</var>...&gt;</code> container directive
726             is ignored.</p>
727         <p>Trailing slashes should typically be removed from the URL of a
728             <code>BalancerMember</code>.</p>
729     </usage>
730 </directivesynopsis>
731
732 <directivesynopsis>
733 <name>ProxySet</name>
734 <description>Set various Proxy balancer or member parameters</description>
735 <syntax>ProxySet <var>url</var> <var>key=value [key=value ...]</var></syntax>
736 <contextlist><context>directory</context>
737 </contextlist>
738 <usage>
739     <p>This directive is used as an alternate method of setting any of the
740     parameters available to Proxy balancers and workers normally done via the
741     <directive module="mod_proxy">ProxyPass</directive> directive. If used
742     within a <code>&lt;Proxy <var>balancer url|worker url</var>&gt;</code>
743     container directive, the <var>url</var> argument is not required. As a side
744     effect the respective balancer or worker gets created. This can be useful
745     when doing reverse proxying via a
746     <directive module="mod_rewrite">RewriteRule</directive> instead of a
747     <directive module="mod_proxy">ProxyPass</directive> directive.</p>
748
749     <example>
750         <highlight language="config">
751 &lt;Proxy balancer://hotcluster&gt;
752     BalancerMember http://www2.example.com:8080 loadfactor=1
753     BalancerMember http://www3.example.com:8080 loadfactor=2
754     ProxySet lbmethod=bytraffic
755 &lt;/Proxy&gt;
756       </highlight>
757     </example>
758
759     <highlight language="config">
760 &lt;Proxy http://backend&gt;
761     ProxySet keepalive=On
762 &lt;/Proxy&gt;
763     </highlight>
764
765     <highlight language="config">
766         ProxySet balancer://foo lbmethod=bytraffic timeout=15
767     </highlight>
768
769     <highlight language="config">
770         ProxySet ajp://backend:7001 timeout=15
771     </highlight>
772
773    <note type="warning"><title>Warning</title>
774       <p>Keep in mind that the same parameter key can have a different meaning
775       depending whether it is applied to a balancer or a worker as shown by the two
776       examples above regarding timeout.</p>
777    </note>
778
779 </usage>
780 </directivesynopsis>
781
782 <directivesynopsis>
783 <name>ProxyPass</name>
784 <description>Maps remote servers into the local server URL-space</description>
785 <syntax>ProxyPass [<var>path</var>] !|<var>url</var> [<var>key=value</var>
786   <var>[key=value</var> ...]] [nocanon] [interpolate] [noquery]</syntax>
787 <contextlist><context>server config</context><context>virtual host</context>
788 <context>directory</context>
789 </contextlist>
790
791 <usage>
792     <p>This directive allows remote servers to be mapped into the
793     space of the local server; the local server does not act as a
794     proxy in the conventional sense, but appears to be a mirror of the
795     remote server. The local server is often called a <dfn>reverse
796     proxy</dfn> or <dfn>gateway</dfn>. The <var>path</var> is the name of
797     a local virtual path; <var>url</var> is a partial URL for the
798     remote server and cannot include a query string.</p>
799
800     <note type="warning">The <directive
801     module="mod_proxy">ProxyRequests</directive> directive should
802     usually be set <strong>off</strong> when using
803     <directive>ProxyPass</directive>.</note>
804
805     <p>Suppose the local server has address <code>http://example.com/</code>;
806     then</p>
807
808     <highlight language="config">
809 &lt;Location /mirror/foo/&gt;
810     ProxyPass http://backend.example.com/
811 &lt;/Location&gt;
812     </highlight>
813
814     <p>will cause a local request for
815     <code>http://example.com/mirror/foo/bar</code> to be internally converted
816     into a proxy request to <code>http://backend.example.com/bar</code>.</p>
817
818     <p>The following alternative syntax is possible, however it can carry a
819     performance penalty when present in very large numbers. The advantage of
820     the below syntax is that it allows for dynamic control via the
821     <a href="mod_proxy_balancer.html#balancer_manager">Balancer Manager</a> interface:</p>
822
823     <highlight language="config">
824         ProxyPass /mirror/foo/ http://backend.example.com/
825     </highlight>
826
827     <note type="warning">
828     <p>If the first argument ends with a trailing <strong>/</strong>, the second
829        argument should also end with a trailing <strong>/</strong> and vice
830        versa. Otherwise the resulting requests to the backend may miss some
831        needed slashes and do not deliver the expected results.
832     </p>
833     </note>
834
835     <p>The <code>!</code> directive is useful in situations where you don't want
836     to reverse-proxy a subdirectory, <em>e.g.</em></p>
837
838     <highlight language="config">
839 &lt;Location /mirror/foo/&gt;
840     ProxyPass http://backend.example.com/
841 &lt;/Location&gt;
842 &lt;Location /mirror/foo/i&gt;
843     ProxyPass !
844 &lt;/Location&gt;
845     </highlight>
846
847     <highlight language="config">
848 ProxyPass /mirror/foo/i !
849 ProxyPass /mirror/foo http://backend.example.com
850     </highlight>
851
852     <p>will proxy all requests to <code>/mirror/foo</code> to
853     <code>backend.example.com</code> <em>except</em> requests made to
854     <code>/mirror/foo/i</code>.</p>
855
856     <note type="warning"><title>Ordering ProxyPass Directives</title>
857       <p>The configured <directive module="mod_proxy">ProxyPass</directive>
858       and <directive module="mod_proxy">ProxyPassMatch</directive>
859       rules are checked in the order of configuration. The first rule that
860       matches wins. So usually you should sort conflicting
861       <directive module="mod_proxy">ProxyPass</directive> rules starting with the
862       longest URLs first. Otherwise later rules for longer URLS will be hidden
863       by any earlier rule which uses a leading substring of the URL. Note that
864       there is some relation with worker sharing. In contrast, only one
865       <directive module="mod_proxy">ProxyPass</directive> directive can be placed
866       in a <directive module="core">Location</directive> block, and the most
867       specific location will take precedence.</p>
868
869       <p>For the same reasons exclusions must come <em>before</em> the
870       general <directive>ProxyPass</directive> directives.</p>
871
872     </note> <!-- /ordering_proxypass -->
873
874     <p>In Apache HTTP Server 2.1 and later, mod_proxy supports pooled
875     connections to a backend server.  Connections created on demand
876     can be retained in a pool for future use.  Limits on the pool size
877     and other settings can be coded on
878     the <directive>ProxyPass</directive> directive
879     using  <code>key=value</code> parameters, described in the table
880     below.</p>
881
882     <p>By default, mod_proxy will allow and retain the maximum number of
883     connections that could be used simultaneously by that web server child
884     process.  Use the <code>max</code> parameter to reduce the number from
885     the default.  Use the <code>ttl</code> parameter to set an optional
886     time to live; connections which have been unused for at least
887     <code>ttl</code> seconds will be closed.  <code>ttl</code> can be used
888     to avoid using a connection which is subject to closing because of the
889     backend server's keep-alive timeout.</p>
890
891     <p>The pool of connections is maintained per web server child
892     process, and <code>max</code> and other settings are not coordinated
893     among all child processes, except when only one child process is allowed
894     by configuration or MPM design.</p>
895
896     <example><title>Example</title>
897         <highlight language="config">
898         ProxyPass /example http://backend.example.com max=20 ttl=120 retry=300
899         </highlight>
900     </example>
901
902     <table border="2"><tr><th>BalancerMember parameters</th></tr></table>
903     <table>
904     <tr><th>Parameter</th>
905         <th>Default</th>
906         <th>Description</th></tr>
907     <tr><td>min</td>
908         <td>0</td>
909         <td>Minimum number of connection pool entries, unrelated to the
910     actual number of connections.  This only needs to be modified from the
911     default for special circumstances where heap memory associated with the
912     backend connections should be preallocated or retained.</td></tr>
913     <tr><td>max</td>
914         <td>1...n</td>
915         <td>Maximum number of connections that will be allowed to the
916     backend server. The default for this limit is the number of threads
917     per process in the active MPM. In the Prefork MPM, this is always 1,
918     while with other MPMs it is controlled by the
919     <directive>ThreadsPerChild</directive> directive.</td></tr>
920     <tr><td>smax</td>
921         <td>max</td>
922         <td>Retained connection pool entries above this limit are freed
923     during certain operations if they have been unused for longer than
924     the time to live, controlled by the <code>ttl</code> parameter.  If
925     the connection pool entry has an associated connection, it will be
926     closed.  This only needs to be modified from the default for special
927     circumstances where connection pool entries and any associated
928     connections which have exceeded the time to live need to be freed or
929     closed more aggressively.</td></tr>
930     <tr><td>acquire</td>
931         <td>-</td>
932         <td>If set this will be the maximum time to wait for a free
933     connection in the connection pool, in milliseconds. If there are no free
934     connections in the pool the Apache httpd will return <code>SERVER_BUSY</code>
935     status to the client.
936     </td></tr>
937     <tr><td>connectiontimeout</td>
938         <td>timeout</td>
939         <td>Connect timeout in seconds.
940         The number of seconds Apache httpd waits for the creation of a connection to
941         the backend to complete. By adding a postfix of ms the timeout can be
942         also set in milliseconds.
943     </td></tr>
944     <tr><td>disablereuse</td>
945         <td>Off</td>
946         <td>This parameter should be used when you want to force mod_proxy
947     to immediately close a connection to the backend after being used, and
948     thus, disable its persistent connection and pool for that backend.
949     This helps in various situations where a firewall between Apache
950     httpd and
951     the backend server (regardless of protocol) tends to silently
952     drop connections or when backends themselves may be under round-
953     robin DNS. To disable connection pooling reuse,
954     set this property value to <code>On</code>.
955     </td></tr>
956     <tr><td>flushpackets</td>
957         <td>off</td>
958         <td>Determines whether the proxy module will auto-flush the output
959         brigade after each "chunk" of data. 'off' means that it will flush
960         only when needed, 'on' means after each chunk is sent and
961         'auto' means poll/wait for a period of time and flush if
962         no input has been received for 'flushwait' milliseconds.
963         Currently this is in effect only for AJP.
964     </td></tr>
965     <tr><td>flushwait</td>
966         <td>10</td>
967         <td>The time to wait for additional input, in milliseconds, before
968         flushing the output brigade if 'flushpackets' is 'auto'.
969     </td></tr>
970     <tr><td>iobuffersize</td>
971         <td>8192</td>
972         <td>Adjusts the size of the internal scratchpad IO buffer. This allows you
973         to override the <directive>ProxyIOBufferSize</directive> for a specific worker.
974         This must be at least 512 or set to 0 for the system default of 8192.
975     </td></tr>
976     <tr><td>keepalive</td>
977         <td>Off</td>
978         <td><p>This parameter should be used when you have a firewall between your
979     Apache httpd and the backend server, who tend to drop inactive connections.
980     This flag will tell the Operating System to send <code>KEEP_ALIVE</code>
981     messages on inactive connections  and thus prevent the firewall to drop the connection.
982     To enable keepalive set this property value to <code>On</code>. </p>
983     <p>The frequency of initial and subsequent TCP keepalive probes
984     depends on global OS settings, and may be as high as 2 hours. To be useful,
985     the frequency configured in the OS must be smaller than the threshold used
986     by the firewall.</p>
987     </td></tr>
988     <tr><td>lbset</td>
989         <td>0</td>
990         <td>Sets the load balancer cluster set that the worker is a member
991          of. The load balancer will try all members of a lower numbered
992          lbset before trying higher numbered ones.
993     </td></tr>
994     <tr><td>ping</td>
995         <td>0</td>
996         <td>Ping property tells the webserver to "test" the connection to
997         the backend before forwarding the request. For AJP, it causes
998         <module>mod_proxy_ajp</module>to send a <code>CPING</code>
999         request on the ajp13 connection (implemented on Tomcat 3.3.2+, 4.1.28+
1000         and 5.0.13+). For HTTP, it causes <module>mod_proxy_http</module>
1001         to send a <code>100-Continue</code> to the backend (only valid for
1002         HTTP/1.1 - for non HTTP/1.1 backends, this property has no
1003         effect). In both cases the parameter is the delay in seconds to wait
1004         for the reply.
1005         This feature has been added to avoid problems with hung and
1006         busy backends.
1007         This will increase the network traffic during the normal operation
1008         which could be an issue, but it will lower the
1009         traffic in case some of the cluster nodes are down or busy.
1010         By adding a postfix of ms the delay can be also set in
1011         milliseconds.
1012     </td></tr>
1013     <tr><td>receivebuffersize</td>
1014         <td>0</td>
1015         <td>Adjusts the size of the explicit (TCP/IP) network buffer size for
1016         proxied connections. This allows you to override the
1017         <directive>ProxyReceiveBufferSize</directive> for a specific worker.
1018         This must be at least 512 or set to 0 for the system default.
1019     </td></tr>
1020     <tr><td>redirect</td>
1021         <td>-</td>
1022         <td>Redirection Route of the worker. This value is usually
1023         set dynamically to enable safe removal of the node from
1024         the cluster. If set all requests without session id will be
1025         redirected to the BalancerMember that has route parameter
1026         equal as this value.
1027     </td></tr>
1028     <tr><td>retry</td>
1029         <td>60</td>
1030         <td>Connection pool worker retry timeout in seconds.
1031     If the connection pool worker to the backend server is in the error state,
1032     Apache httpd will not forward any requests to that server until the timeout
1033     expires. This enables to shut down the backend server for maintenance,
1034     and bring it back online later. A value of 0 means always retry workers
1035     in an error state with no timeout.
1036     </td></tr>
1037     <tr><td>route</td>
1038         <td>-</td>
1039         <td>Route of the worker when used inside load balancer.
1040         The route is a value appended to session id.
1041     </td></tr>
1042     <tr><td>status</td>
1043         <td>-</td>
1044         <td>Single letter value defining the initial status of
1045         this worker.
1046         <table>
1047          <tr><td>D: Worker is disabled and will not accept any requests.</td></tr>
1048          <tr><td>S: Worker is administratively stopped.</td></tr>
1049          <tr><td>I: Worker is in ignore-errors mode, and will always be considered available.</td></tr>
1050          <tr><td>H: Worker is in hot-standby mode and will only be used if no other
1051                     viable workers are available.</td></tr>
1052          <tr><td>E: Worker is in an error state.</td></tr>
1053          <tr><td>N: Worker is in drain mode, and will only accept existing sticky sessions
1054                     destined for itself and ignore all other requests.</td></tr>
1055         </table>Status
1056         can be set (which is the default) by prepending with '+' or
1057         cleared by prepending with '-'.
1058         Thus, a setting of 'S-E' sets this worker to Stopped and
1059         clears the in-error flag.
1060     </td></tr>
1061     <tr><td>timeout</td>
1062         <td><directive module="mod_proxy">ProxyTimeout</directive></td>
1063         <td>Connection timeout in seconds.
1064         The number of seconds Apache httpd waits for data sent by / to the backend.
1065     </td></tr>
1066     <tr><td>ttl</td>
1067         <td>-</td>
1068         <td>Time to live for inactive connections and associated connection
1069         pool entries, in seconds.  Once reaching this limit, a
1070         connection will not be used again; it will be closed at some
1071         later time.
1072     </td></tr>
1073
1074     </table>
1075
1076     <p>If the Proxy directive scheme starts with the
1077     <code>balancer://</code> (eg: <code>balancer://cluster</code>,
1078     any path information is ignored)  then a virtual worker that does not really
1079     communicate with the backend server will be created. Instead it is responsible
1080     for the management of several "real" workers. In that case the special set of
1081     parameters can be add to this virtual worker. See <module>mod_proxy_balancer</module>
1082     for more information about how the balancer works.
1083     </p>
1084     <table border="2"><tr><th>Balancer parameters</th></tr></table>
1085     <table>
1086     <tr><th>Parameter</th>
1087         <th>Default</th>
1088         <th>Description</th></tr>
1089     <tr><td>lbmethod</td>
1090         <td>byrequests</td>
1091         <td>Balancer load-balance method. Select the load-balancing scheduler
1092         method to use. Either <code>byrequests</code>, to perform weighted
1093         request counting, <code>bytraffic</code>, to perform weighted
1094         traffic byte count balancing, or <code>bybusyness</code>, to perform
1095         pending request balancing. Default is <code>byrequests</code>.
1096     </td></tr>
1097     <tr><td>maxattempts</td>
1098         <td>One less than the number of workers, or 1 with a single worker.</td>
1099         <td>Maximum number of failover attempts before giving up.
1100     </td></tr>
1101     <tr><td>nofailover</td>
1102         <td>Off</td>
1103         <td>If set to <code>On</code> the session will break if the worker is in
1104         error state or disabled. Set this value to On if backend servers do not
1105         support session replication.
1106     </td></tr>
1107     <tr><td>stickysession</td>
1108         <td>-</td>
1109         <td>Balancer sticky session name. The value is usually set to something
1110         like <code>JSESSIONID</code> or <code>PHPSESSIONID</code>,
1111         and it depends on the backend application server that support sessions.
1112         If the backend application server uses different name for cookies
1113         and url encoded id (like servlet containers) use | to to separate them.
1114         The first part is for the cookie the second for the path.
1115     </td></tr>
1116     <tr><td>stickysessionsep</td>
1117         <td>"."</td>
1118         <td>Sets the separation symbol in the session cookie. Some backend application servers
1119         do not use the '.' as the symbol. For example the Oracle Weblogic server uses 
1120         '!'. The correct symbol can be set using this option. The setting of 'Off'
1121         signifies that no symbol is used.
1122     </td></tr>
1123     <tr><td>scolonpathdelim</td>
1124         <td>Off</td>
1125         <td>If set to <code>On</code> the semi-colon character ';' will be
1126         used as an additional sticky session path deliminator/separator. This
1127         is mainly used to emulate mod_jk's behavior when dealing with paths such
1128         as <code>JSESSIONID=6736bcf34;foo=aabfa</code>
1129     </td></tr>
1130     <tr><td>timeout</td>
1131         <td>0</td>
1132         <td>Balancer timeout in seconds. If set this will be the maximum time
1133         to wait for a free worker. Default is not to wait.
1134     </td></tr>
1135     <tr><td>failonstatus</td>
1136         <td>-</td>
1137         <td>A single or comma-separated list of HTTP status codes. If set this will
1138         force the worker into error state when the backend returns any status code
1139         in the list. Worker recovery behaves the same as other worker errors.
1140     </td></tr>
1141     <tr><td>nonce</td>
1142         <td>&lt;auto&gt;</td>
1143         <td>The protective nonce used in the <code>balancer-manager</code> application page.
1144         The default is to use an automatically determined UUID-based
1145         nonce, to provide for further protection for the page. If set,
1146         then the nonce is set to that value. A setting of <code>None</code>
1147         disables all nonce checking.
1148     <note><title>Note</title>
1149       <p>In addition to the nonce, the <code>balancer-manager</code> page
1150       should be protected via an ACL.</p>
1151     </note>
1152      </td></tr>
1153     <tr><td>growth</td>
1154         <td>0</td>
1155         <td>Number of additional BalancerMembers to allow to be added
1156         to this balancer in addition to those defined at configuration.
1157     </td></tr>
1158     <tr><td>forcerecovery</td>
1159         <td>On</td>
1160         <td>Force the immediate recovery of all workers without considering the
1161         retry parameter of the workers if all workers of a balancer are
1162         in error state. There might be cases where an already overloaded backend
1163         can get into deeper trouble if the recovery of all workers is enforced
1164         without considering the retry parameter of each worker. In this case
1165         set to <code>Off</code>.
1166     </td></tr>
1167
1168     </table>
1169     <p>A sample balancer setup</p>
1170     <highlight language="config">
1171 ProxyPass /special-area http://special.example.com smax=5 max=10
1172 ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On
1173 &lt;Proxy balancer://mycluster&gt;
1174     BalancerMember ajp://1.2.3.4:8009
1175     BalancerMember ajp://1.2.3.5:8009 loadfactor=20
1176     # Less powerful server, don't send as many requests there,
1177     BalancerMember ajp://1.2.3.6:8009 loadfactor=5
1178 &lt;/Proxy&gt;
1179     </highlight>
1180
1181     <p>Setting up a hot-standby, that will only be used if no other
1182      members are available</p>
1183     <highlight language="config">
1184 ProxyPass / balancer://hotcluster/
1185 &lt;Proxy balancer://hotcluster&gt;
1186     BalancerMember ajp://1.2.3.4:8009 loadfactor=1
1187     BalancerMember ajp://1.2.3.5:8009 loadfactor=2
1188     # The server below is on hot standby
1189     BalancerMember ajp://1.2.3.6:8009 status=+H
1190     ProxySet lbmethod=bytraffic
1191 &lt;/Proxy&gt;
1192     </highlight>
1193
1194     <p>Normally, mod_proxy will canonicalise ProxyPassed URLs.
1195     But this may be incompatible with some backends, particularly those
1196     that make use of <var>PATH_INFO</var>.  The optional <var>nocanon</var>
1197     keyword suppresses this, and passes the URL path "raw" to the
1198     backend.  Note that may affect the security of your backend, as it
1199     removes the normal limited protection against URL-based attacks
1200     provided by the proxy.</p>
1201
1202     <p>The optional <var>interpolate</var> keyword (available in
1203     httpd 2.2.9 and later), in combination with
1204     <directive>ProxyPassInterpolateEnv</directive> causes the ProxyPass
1205     to interpolate environment variables, using the syntax
1206     <var>${VARNAME}</var>.  Note that many of the standard CGI-derived
1207     environment variables will not exist when this interpolation happens,
1208     so you may still have to resort to <module>mod_rewrite</module>
1209     for complex rules.</p>
1210
1211     <p>Normally, mod_proxy will include the query string when
1212     generating the <var>SCRIPT_FILENAME</var> environment variable.
1213     The optional <var>noquery</var> keyword (available in
1214     httpd 2.4.1 and later) prevents this.</p>
1215
1216     <p>When used inside a <directive type="section" module="core"
1217     >Location</directive> section, the first argument is omitted and the local
1218     directory is obtained from the <directive type="section" module="core"
1219     >Location</directive>. The same will occur inside a
1220     <directive type="section" module="core">LocationMatch</directive> section,
1221     however ProxyPass does not interpret the regexp as such, so it is necessary
1222     to use <directive>ProxyPassMatch</directive> in this situation instead.</p>
1223
1224     <p>This directive is not supported in <directive type="section" module="core"
1225     >Directory</directive> or <directive type="section" module="core"
1226     >Files</directive> sections.</p>
1227
1228     <p>If you require a more flexible reverse-proxy configuration, see the
1229     <directive module="mod_rewrite">RewriteRule</directive> directive with the
1230     <code>[P]</code> flag.</p>
1231
1232 </usage>
1233 </directivesynopsis>
1234
1235 <directivesynopsis>
1236 <name>ProxyPassMatch</name>
1237 <description>Maps remote servers into the local server URL-space using regular expressions</description>
1238 <syntax>ProxyPassMatch [<var>regex</var>] !|<var>url</var> [<var>key=value</var>
1239         <var>[key=value</var> ...]]</syntax>
1240 <contextlist><context>server config</context><context>virtual host</context>
1241 <context>directory</context>
1242 </contextlist>
1243
1244 <usage>
1245     <p>This directive is equivalent to <directive module="mod_proxy">ProxyPass</directive>,
1246        but makes use of regular expressions, instead of simple prefix matching. The
1247        supplied regular expression is matched against the <var>url</var>, and if it
1248        matches, the server will substitute any parenthesized matches into the given
1249        string and use it as a new <var>url</var>.</p>
1250
1251     <p>Suppose the local server has address <code>http://example.com/</code>;
1252     then</p>
1253
1254     <highlight language="config">
1255       ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com$1
1256     </highlight>
1257
1258     <p>will cause a local request for
1259     <code>http://example.com/foo/bar.gif</code> to be internally converted
1260     into a proxy request to <code>http://backend.example.com/foo/bar.gif</code>.</p>
1261     <note><title>Note</title>
1262       <p>The URL argument must be parsable as a URL <em>before</em> regexp
1263       substitutions (as well as after).  This limits the matches you can use.
1264       For instance, if we had used</p>
1265       <highlight language="config">
1266         ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com:8000$1
1267       </highlight>
1268       <p>in our previous example, it would fail with a syntax error
1269       at server startup.  This is a bug (PR 46665 in the ASF bugzilla),
1270       and the workaround is to reformulate the match:</p>
1271       <highlight language="config">
1272         ProxyPassMatch ^/(.*\.gif)$ http://backend.example.com:8000/$1
1273       </highlight>
1274     </note>
1275     <p>The <code>!</code> directive is useful in situations where you don't want
1276     to reverse-proxy a subdirectory.</p>
1277
1278     <p>When used inside a <directive type="section" module="core"
1279     >LocationMatch</directive> section, the first argument is omitted and the
1280     regexp is obtained from the <directive type="section" module="core"
1281     >LocationMatch</directive>.</p>
1282
1283     <p>If you require a more flexible reverse-proxy configuration, see the
1284     <directive module="mod_rewrite">RewriteRule</directive> directive with the
1285     <code>[P]</code> flag.</p>
1286
1287     <note type="warning">
1288       <title>Security Warning</title>
1289       <p>Take care when constructing the target URL of the rule, considering
1290         the security impact from allowing the client influence over the set of
1291         URLs to which your server will act as a proxy.  Ensure that the scheme
1292         and hostname part of the URL is either fixed, or does not allow the
1293         client undue influence.</p>
1294     </note>
1295 </usage>
1296 </directivesynopsis>
1297
1298 <directivesynopsis>
1299 <name>ProxyPassReverse</name>
1300 <description>Adjusts the URL in HTTP response headers sent from a reverse
1301 proxied server</description>
1302 <syntax>ProxyPassReverse [<var>path</var>] <var>url</var>
1303 [<var>interpolate</var>]</syntax>
1304 <contextlist><context>server config</context><context>virtual host</context>
1305 <context>directory</context>
1306 </contextlist>
1307
1308 <usage>
1309     <p>This directive lets Apache httpd adjust the URL in the <code>Location</code>,
1310     <code>Content-Location</code> and <code>URI</code> headers on HTTP
1311     redirect responses. This is essential when Apache httpd is used as a
1312     reverse proxy (or gateway) to avoid by-passing the reverse proxy
1313     because of HTTP redirects on the backend servers which stay behind
1314     the reverse proxy.</p>
1315
1316     <p>Only the HTTP response headers specifically mentioned above
1317     will be rewritten. Apache httpd will not rewrite other response
1318     headers, nor will it by default rewrite URL references inside HTML pages.
1319     This means that if the proxied content contains absolute URL
1320     references, they will by-pass the proxy. To rewrite HTML content to
1321     match the proxy, you must load and enable <module>mod_proxy_html</module>.
1322     </p>
1323
1324     <p><var>path</var> is the name of a local virtual path. <var>url</var> is a
1325     partial URL for the remote server - the same way they are used for the
1326     <directive module="mod_proxy">ProxyPass</directive> directive.</p>
1327
1328     <p>For example, suppose the local server has address
1329     <code>http://example.com/</code>; then</p>
1330
1331     <highlight language="config">
1332 ProxyPass         /mirror/foo/ http://backend.example.com/
1333 ProxyPassReverse  /mirror/foo/ http://backend.example.com/
1334 ProxyPassReverseCookieDomain  backend.example.com  public.example.com
1335 ProxyPassReverseCookiePath  /  /mirror/foo/
1336     </highlight>
1337
1338     <p>will not only cause a local request for the
1339     <code>http://example.com/mirror/foo/bar</code> to be internally converted
1340     into a proxy request to <code>http://backend.example.com/bar</code>
1341     (the functionality <code>ProxyPass</code> provides here). It also takes care
1342     of redirects the server <code>backend.example.com</code> sends: when
1343     <code>http://backend.example.com/bar</code> is redirected by him to
1344     <code>http://backend.example.com/quux</code> Apache httpd adjusts this to
1345     <code>http://example.com/mirror/foo/quux</code> before forwarding the HTTP
1346     redirect response to the client. Note that the hostname used for
1347     constructing the URL is chosen in respect to the setting of the <directive
1348     module="core">UseCanonicalName</directive> directive.</p>
1349
1350     <p>Note that this <directive>ProxyPassReverse</directive> directive can
1351     also be used in conjunction with the proxy pass-through feature
1352     (<code>RewriteRule ...  [P]</code>) from <module>mod_rewrite</module>
1353     because it doesn't depend on a corresponding <directive module="mod_proxy"
1354     >ProxyPass</directive> directive.</p>
1355
1356     <p>The optional <var>interpolate</var> keyword (available in
1357     httpd 2.2.9 and later), used together with
1358     <directive>ProxyPassInterpolateEnv</directive>, enables interpolation
1359     of environment variables specified using the format <var>${VARNAME}</var>.
1360     </p>
1361
1362     <p>When used inside a <directive type="section" module="core"
1363     >Location</directive> section, the first argument is omitted and the local
1364     directory is obtained from the <directive type="section" module="core"
1365     >Location</directive>. The same occurs inside a <directive type="section"
1366     module="core">LocationMatch</directive> section, but will probably not work as
1367     intended, as ProxyPassReverse will interpret the regexp literally as a
1368     path; if needed in this situation, specify the ProxyPassReverse outside
1369     the section, or in a separate <directive type="section" module="core"
1370     >Location</directive> section.</p>
1371
1372     <p>This directive is not supported in <directive type="section" module="core"
1373     >Directory</directive> or <directive type="section" module="core"
1374     >Files</directive> sections.</p>
1375 </usage>
1376 </directivesynopsis>
1377
1378 <directivesynopsis>
1379 <name>ProxyPassReverseCookieDomain</name>
1380 <description>Adjusts the Domain string in Set-Cookie headers from a reverse-
1381 proxied server</description>
1382 <syntax>ProxyPassReverseCookieDomain <var>internal-domain</var>
1383 <var>public-domain</var> [<var>interpolate</var>]</syntax>
1384 <contextlist><context>server config</context><context>virtual host</context>
1385 <context>directory</context>
1386 </contextlist>
1387 <usage>
1388 <p>Usage is basically similar to
1389 <directive module="mod_proxy">ProxyPassReverse</directive>, but instead of
1390 rewriting headers that are a URL, this rewrites the <code>domain</code>
1391 string in <code>Set-Cookie</code> headers.</p>
1392 </usage>
1393 </directivesynopsis>
1394
1395
1396 <directivesynopsis>
1397 <name>ProxyPassReverseCookiePath</name>
1398 <description>Adjusts the Path string in Set-Cookie headers from a reverse-
1399 proxied server</description>
1400 <syntax>ProxyPassReverseCookiePath <var>internal-path</var>
1401 <var>public-path</var> [<var>interpolate</var>]</syntax>
1402 <contextlist><context>server config</context><context>virtual host</context>
1403 <context>directory</context>
1404 </contextlist>
1405 <usage>
1406 <p>
1407 Useful in conjunction with
1408 <directive module="mod_proxy">ProxyPassReverse</directive>
1409 in situations where backend URL paths are mapped to public paths on the
1410 reverse proxy. This directive rewrites the <code>path</code> string in
1411 <code>Set-Cookie</code> headers. If the beginning of the cookie path matches
1412 <var>internal-path</var>, the cookie path will be replaced with
1413 <var>public-path</var>.
1414 </p><p>
1415 In the example given with 
1416 <directive module="mod_proxy">ProxyPassReverse</directive>, the directive:
1417 </p>
1418     <highlight language="config">
1419       ProxyPassReverseCookiePath  /  /mirror/foo/
1420     </highlight>
1421 <p>
1422 will rewrite a cookie with backend path <code>/</code> (or
1423 <code>/example</code> or, in fact, anything) to <code>/mirror/foo/</code>.
1424 </p>
1425 </usage>
1426 </directivesynopsis>
1427
1428 <directivesynopsis>
1429 <name>ProxyBlock</name>
1430 <description>Disallow proxy requests to certain hosts</description>
1431 <syntax>ProxyBlock *|<var>hostname</var>|<var>partial-hostname</var> [<var>hostname</var>|<var>partial-hostname</var>]...</syntax>
1432 <contextlist><context>server config</context><context>virtual host</context>
1433 </contextlist>
1434
1435 <usage>
1436     <p>The <directive>ProxyBlock</directive> directive can be used to
1437     block FTP or HTTP access to certain hosts via the proxy, based on
1438     a full or partial hostname match, or, if applicable, an IP address
1439     comparison.</p>
1440
1441     <p>Each of the arguments to the <directive>ProxyBlock</directive>
1442     directive can be either <code>*</code> or a alphanumeric string.
1443     At startup, the module will attempt to resolve every alphanumeric
1444     string from a DNS name to a set of IP addresses, but any DNS errors
1445     are ignored.</p>
1446
1447     <p>If an asterisk "<code>*</code>" argument is specified,
1448     <module>mod_proxy</module> will deny access to all FTP or HTTP
1449     sites.</p>
1450
1451     <p>Otherwise, for any request for an HTTP or FTP resource via the
1452     proxy, <module>mod_proxy</module> will check the hostname of the
1453     request URI against each specified string.  If a partial string
1454     match is found, access is denied.  If no matches against hostnames
1455     are found, and a remote (forward) proxy is configured using
1456     <directive>ProxyRemote</directive> or
1457     <directive>ProxyRemoteMatch</directive>, access is allowed.  If no
1458     remote (forward) proxy is configured, the IP address of the
1459     hostname from the URI is compared against all resolved IP
1460     addresses determined at startup.  Access is denied if any match is
1461     found.</p>
1462
1463     <p>Note that the DNS lookups may slow down the startup time of the
1464     server.</p>
1465
1466     <example><title>Example</title>
1467     <highlight language="config">
1468       ProxyBlock news.example.com auctions.example.com friends.example.com
1469       </highlight>
1470     </example>
1471
1472     <p>Note that <code>example</code> would also be sufficient to match any
1473     of these sites.</p>
1474
1475     <p>Hosts would also be matched if referenced by IP address.</p>
1476
1477     <p>Note also that</p>
1478
1479     <highlight language="config">
1480       ProxyBlock *
1481     </highlight>
1482
1483     <p>blocks connections to all sites.</p>
1484 </usage>
1485 </directivesynopsis>
1486
1487 <directivesynopsis>
1488 <name>ProxyReceiveBufferSize</name>
1489 <description>Network buffer size for proxied HTTP and FTP
1490 connections</description>
1491 <syntax>ProxyReceiveBufferSize <var>bytes</var></syntax>
1492 <default>ProxyReceiveBufferSize 0</default>
1493 <contextlist><context>server config</context><context>virtual host</context>
1494 </contextlist>
1495
1496 <usage>
1497     <p>The <directive>ProxyReceiveBufferSize</directive> directive specifies an
1498     explicit (TCP/IP) network buffer size for proxied HTTP and FTP connections,
1499     for increased throughput. It has to be greater than <code>512</code> or set
1500     to <code>0</code> to indicate that the system's default buffer size should
1501     be used.</p>
1502
1503     <example><title>Example</title>
1504     <highlight language="config">
1505       ProxyReceiveBufferSize 2048
1506       </highlight>
1507     </example>
1508 </usage>
1509 </directivesynopsis>
1510
1511 <directivesynopsis>
1512 <name>ProxyIOBufferSize</name>
1513 <description>Determine size of internal data throughput buffer</description>
1514 <syntax>ProxyIOBufferSize <var>bytes</var></syntax>
1515 <default>ProxyIOBufferSize 8192</default>
1516 <contextlist><context>server config</context><context>virtual host</context>
1517 </contextlist>
1518
1519 <usage>
1520     <p>The <directive>ProxyIOBufferSize</directive> directive adjusts the size
1521     of the internal buffer, which is used as a scratchpad for the data between
1522     input and output. The size must be at least <code>512</code>.</p>
1523
1524     <p>In almost every case there's no reason to change that value.</p>
1525     <p>If used with AJP this directive sets the maximum AJP packet size in
1526     bytes. If you change it from the default, you must also change the
1527     <code>packetSize</code> attribute of your AJP connector on the
1528     Tomcat side! The attribute <code>packetSize</code> is only available
1529     in Tomcat <code>5.5.20+</code> and <code>6.0.2+</code></p>
1530     <p>Normally it is not necessary to change the maximum packet size.
1531     Problems with the default value have been reported when sending
1532     certificates or certificate chains.</p>
1533
1534 </usage>
1535 </directivesynopsis>
1536
1537 <directivesynopsis>
1538 <name>ProxyMaxForwards</name>
1539 <description>Maximium number of proxies that a request can be forwarded
1540 through</description>
1541 <syntax>ProxyMaxForwards <var>number</var></syntax>
1542 <default>ProxyMaxForwards -1</default>
1543 <contextlist><context>server config</context><context>virtual host</context>
1544 </contextlist>
1545
1546 <usage>
1547     <p>The <directive>ProxyMaxForwards</directive> directive specifies the
1548     maximum number of proxies through which a request may pass, if there's no
1549     <code>Max-Forwards</code> header supplied with the request. This may
1550     be set to prevent infinite proxy loops, or a DoS attack.</p>
1551
1552     <example><title>Example</title>
1553     <highlight language="config">
1554       ProxyMaxForwards 15
1555       </highlight>
1556     </example>
1557
1558     <p>Note that setting <directive>ProxyMaxForwards</directive> is a
1559     violation of the HTTP/1.1 protocol (RFC2616), which forbids a Proxy
1560     setting <code>Max-Forwards</code> if the Client didn't set it.
1561     Earlier Apache httpd versions would always set it.  A negative
1562     <directive>ProxyMaxForwards</directive> value, including the
1563     default -1, gives you protocol-compliant behaviour, but may
1564     leave you open to loops.</p>
1565 </usage>
1566 </directivesynopsis>
1567
1568 <directivesynopsis>
1569 <name>NoProxy</name>
1570 <description>Hosts, domains, or networks that will be connected to
1571 directly</description>
1572 <syntax>NoProxy <var>host</var> [<var>host</var>] ...</syntax>
1573 <contextlist><context>server config</context><context>virtual host</context>
1574 </contextlist>
1575
1576 <usage>
1577     <p>This directive is only useful for Apache httpd proxy servers within
1578     intranets.  The <directive>NoProxy</directive> directive specifies a
1579     list of subnets, IP addresses, hosts and/or domains, separated by
1580     spaces. A request to a host which matches one or more of these is
1581     always served directly, without forwarding to the configured
1582     <directive module="mod_proxy">ProxyRemote</directive> proxy server(s).</p>
1583
1584     <example><title>Example</title>
1585     <highlight language="config">
1586 ProxyRemote  *  http://firewall.example.com:81
1587 NoProxy         .example.com 192.168.112.0/21
1588     </highlight>
1589     </example>
1590
1591     <p>The <var>host</var> arguments to the <directive>NoProxy</directive>
1592     directive are one of the following type list:</p>
1593
1594     <dl>
1595     <!-- ===================== Domain ======================= -->
1596     <dt><var><a name="domain" id="domain">Domain</a></var></dt>
1597     <dd>
1598     <p>A <dfn>Domain</dfn> is a partially qualified DNS domain name, preceded
1599     by a period. It represents a list of hosts which logically belong to the
1600     same DNS domain or zone (<em>i.e.</em>, the suffixes of the hostnames are
1601     all ending in <var>Domain</var>).</p>
1602
1603     <example><title>Examples</title>
1604       .com .example.org.
1605     </example>
1606
1607     <p>To distinguish <var>Domain</var>s from <var><a href="#hostname"
1608     >Hostname</a></var>s (both syntactically and semantically; a DNS domain can
1609     have a DNS A record, too!), <var>Domain</var>s are always written with a
1610     leading period.</p>
1611
1612     <note><title>Note</title>
1613       <p>Domain name comparisons are done without regard to the case, and
1614       <var>Domain</var>s are always assumed to be anchored in the root of the
1615       DNS tree, therefore two domains <code>.ExAmple.com</code> and
1616       <code>.example.com.</code> (note the trailing period) are considered
1617       equal. Since a domain comparison does not involve a DNS lookup, it is much
1618       more efficient than subnet comparison.</p>
1619     </note></dd>
1620
1621     <!-- ===================== SubNet ======================= -->
1622     <dt><var><a name="subnet" id="subnet">SubNet</a></var></dt>
1623     <dd>
1624     <p>A <dfn>SubNet</dfn> is a partially qualified internet address in
1625     numeric (dotted quad) form, optionally followed by a slash and the netmask,
1626     specified as the number of significant bits in the <var>SubNet</var>. It is
1627     used to represent a subnet of hosts which can be reached over a common
1628     network interface. In the absence of the explicit net mask it is assumed
1629     that omitted (or zero valued) trailing digits specify the mask. (In this
1630     case, the netmask can only be multiples of 8 bits wide.) Examples:</p>
1631
1632     <dl>
1633     <dt><code>192.168</code> or <code>192.168.0.0</code></dt>
1634     <dd>the subnet 192.168.0.0 with an implied netmask of 16 valid bits
1635     (sometimes used in the netmask form <code>255.255.0.0</code>)</dd>
1636     <dt><code>192.168.112.0/21</code></dt>
1637     <dd>the subnet <code>192.168.112.0/21</code> with a netmask of 21
1638     valid bits (also used in the form <code>255.255.248.0</code>)</dd>
1639     </dl>
1640
1641     <p>As a degenerate case, a <em>SubNet</em> with 32 valid bits is the
1642     equivalent to an <var><a href="#ipaddr">IPAddr</a></var>, while a <var>SubNet</var> with zero
1643     valid bits (<em>e.g.</em>, 0.0.0.0/0) is the same as the constant
1644     <var>_Default_</var>, matching any IP address.</p></dd>
1645
1646     <!-- ===================== IPAddr ======================= -->
1647     <dt><var><a name="ipaddr" id="ipaddr">IPAddr</a></var></dt>
1648     <dd>
1649     <p>A <dfn>IPAddr</dfn> represents a fully qualified internet address in
1650     numeric (dotted quad) form. Usually, this address represents a host, but
1651     there need not necessarily be a DNS domain name connected with the
1652     address.</p>
1653     <example><title>Example</title>
1654       192.168.123.7
1655     </example>
1656
1657     <note><title>Note</title>
1658       <p>An <var>IPAddr</var> does not need to be resolved by the DNS system, so
1659       it can result in more effective apache performance.</p>
1660     </note></dd>
1661
1662     <!-- ===================== Hostname ======================= -->
1663     <dt><var><a name="hostname" id="hostname">Hostname</a></var></dt>
1664     <dd>
1665     <p>A <dfn>Hostname</dfn> is a fully qualified DNS domain name which can
1666     be resolved to one or more <var><a href="#ipaddr">IPAddrs</a></var> via the
1667     DNS domain name service. It represents a logical host (in contrast to
1668     <var><a href="#domain">Domain</a></var>s, see above) and must be resolvable
1669     to at least one <var><a href="#ipaddr">IPAddr</a></var> (or often to a list
1670     of hosts with different <var><a href="#ipaddr">IPAddr</a></var>s).</p>
1671
1672     <example><title>Examples</title>
1673       prep.ai.example.edu<br />
1674       www.example.org
1675     </example>
1676
1677     <note><title>Note</title>
1678       <p>In many situations, it is more effective to specify an <var><a
1679       href="#ipaddr">IPAddr</a></var> in place of a <var>Hostname</var> since a
1680       DNS lookup can be avoided. Name resolution in Apache httpd can take a remarkable
1681       deal of time when the connection to the name server uses a slow PPP
1682       link.</p>
1683       <p><var>Hostname</var> comparisons are done without regard to the case,
1684       and <var>Hostname</var>s are always assumed to be anchored in the root
1685       of the DNS tree, therefore two hosts <code>WWW.ExAmple.com</code>
1686       and <code>www.example.com.</code> (note the trailing period) are
1687       considered equal.</p>
1688      </note></dd>
1689     </dl>
1690 </usage>
1691 <seealso><a href="../dns-caveats.html">DNS Issues</a></seealso>
1692 </directivesynopsis>
1693
1694 <directivesynopsis>
1695 <name>ProxyTimeout</name>
1696 <description>Network timeout for proxied requests</description>
1697 <syntax>ProxyTimeout <var>seconds</var></syntax>
1698 <default>Value of <directive module="core">Timeout</directive></default>
1699 <contextlist><context>server config</context><context>virtual host</context>
1700 </contextlist>
1701
1702 <usage>
1703     <p>This directive allows a user to specifiy a timeout on proxy requests.
1704     This is useful when you have a slow/buggy appserver which hangs, and you
1705     would rather just return a timeout and fail gracefully instead of waiting
1706     however long it takes the server to return.</p>
1707 </usage>
1708 </directivesynopsis>
1709
1710 <directivesynopsis>
1711 <name>ProxyDomain</name>
1712 <description>Default domain name for proxied requests</description>
1713 <syntax>ProxyDomain <var>Domain</var></syntax>
1714 <contextlist><context>server config</context><context>virtual host</context>
1715 </contextlist>
1716
1717 <usage>
1718     <p>This directive is only useful for Apache httpd proxy servers within
1719     intranets. The <directive>ProxyDomain</directive> directive specifies
1720     the default domain which the apache proxy server will belong to. If a
1721     request to a host without a domain name is encountered, a redirection
1722     response to the same host with the configured <var>Domain</var> appended
1723     will be generated.</p>
1724
1725     <example><title>Example</title>
1726     <highlight language="config">
1727       ProxyRemote  *  http://firewall.example.com:81<br />
1728       NoProxy         .example.com 192.168.112.0/21<br />
1729       ProxyDomain     .example.com
1730       </highlight>
1731     </example>
1732 </usage>
1733 </directivesynopsis>
1734
1735 <directivesynopsis>
1736 <name>ProxyVia</name>
1737 <description>Information provided in the <code>Via</code> HTTP response
1738 header for proxied requests</description>
1739 <syntax>ProxyVia On|Off|Full|Block</syntax>
1740 <default>ProxyVia Off</default>
1741 <contextlist><context>server config</context><context>virtual host</context>
1742 </contextlist>
1743
1744 <usage>
1745     <p>This directive controls the use of the <code>Via:</code> HTTP
1746     header by the proxy. Its intended use is to control the flow of
1747     proxy requests along a chain of proxy servers.  See <a
1748     href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a> (HTTP/1.1), section
1749     14.45 for an explanation of <code>Via:</code> header lines.</p>
1750
1751     <ul>
1752     <li>If set to <code>Off</code>, which is the default, no special processing
1753     is performed. If a request or reply contains a <code>Via:</code> header,
1754     it is passed through unchanged.</li>
1755
1756     <li>If set to <code>On</code>, each request and reply will get a
1757     <code>Via:</code> header line added for the current host.</li>
1758
1759     <li>If set to <code>Full</code>, each generated <code>Via:</code> header
1760     line will additionally have the Apache httpd server version shown as a
1761     <code>Via:</code> comment field.</li>
1762
1763     <li>If set to <code>Block</code>, every proxy request will have all its
1764     <code>Via:</code> header lines removed. No new <code>Via:</code> header will
1765     be generated.</li>
1766     </ul>
1767 </usage>
1768 </directivesynopsis>
1769
1770 <directivesynopsis>
1771 <name>ProxyErrorOverride</name>
1772 <description>Override error pages for proxied content</description>
1773 <syntax>ProxyErrorOverride On|Off</syntax>
1774 <default>ProxyErrorOverride Off</default>
1775 <contextlist><context>server config</context><context>virtual host</context>
1776 <context>directory</context>
1777 </contextlist>
1778
1779 <usage>
1780     <p>This directive is useful for reverse-proxy setups, where you want to
1781     have a common look and feel on the error pages seen by the end user.
1782     This also allows for included files (via
1783     <module>mod_include</module>'s SSI) to get
1784     the error code and act accordingly (default behavior would display
1785     the error page of the proxied server, turning this on shows the SSI
1786     Error message).</p>
1787
1788     <p>This directive does not affect the processing of informational (1xx),
1789     normal success (2xx), or redirect (3xx) responses.</p>
1790 </usage>
1791 </directivesynopsis>
1792
1793 <directivesynopsis>
1794 <name>ProxyPassInterpolateEnv</name>
1795 <description>Enable Environment Variable interpolation in Reverse Proxy configurations</description>
1796 <syntax>ProxyPassInterpolateEnv On|Off</syntax>
1797 <default>ProxyPassInterpolateEnv Off</default>
1798 <contextlist><context>server config</context>
1799 <context>virtual host</context>
1800 <context>directory</context>
1801 </contextlist>
1802
1803 <usage>
1804     <p>This directive, together with the <var>interpolate</var> argument to
1805     <directive>ProxyPass</directive>, <directive>ProxyPassReverse</directive>,
1806     <directive>ProxyPassReverseCookieDomain</directive> and
1807     <directive>ProxyPassReverseCookiePath</directive>
1808     enables reverse proxies to be dynamically
1809     configured using environment variables, which may be set by
1810     another module such as <module>mod_rewrite</module>.
1811     It affects the <directive>ProxyPass</directive>,
1812     <directive>ProxyPassReverse</directive>,
1813     <directive>ProxyPassReverseCookieDomain</directive>, and
1814     <directive>ProxyPassReverseCookiePath</directive> directives,
1815     and causes them to substitute the value of an environment
1816     variable <code>varname</code> for the string <code>${varname}</code>
1817     in configuration directives (if the <var>interpolate</var> option is set).</p>
1818     <p>Keep this turned off (for server performance) unless you need it!</p>
1819 </usage>
1820 </directivesynopsis>
1821
1822 <directivesynopsis>
1823 <name>ProxyStatus</name>
1824 <description>Show Proxy LoadBalancer status in mod_status</description>
1825 <syntax>ProxyStatus Off|On|Full</syntax>
1826 <default>ProxyStatus Off</default>
1827 <contextlist><context>server config</context>
1828 <context>virtual host</context>
1829 </contextlist>
1830
1831 <usage>
1832     <p>This directive determines whether or not proxy
1833     loadbalancer status data is displayed via the <module>mod_status</module>
1834     server-status page.</p>
1835     <note><title>Note</title>
1836       <p><strong>Full</strong> is synonymous with <strong>On</strong></p>
1837     </note>
1838
1839 </usage>
1840 </directivesynopsis>
1841
1842 <directivesynopsis>
1843 <name>ProxyAddHeaders</name>
1844 <description>Add proxy information in X-Forwarded-* headers</description>
1845 <syntax>ProxyAddHeaders Off|On</syntax>
1846 <default>ProxyAddHeaders On</default>
1847 <contextlist><context>server config</context>
1848 <context>virtual host</context>
1849 <context>directory</context>
1850 </contextlist>
1851 <compatibility>Available in version 2.3.10 and later</compatibility>
1852
1853 <usage>
1854     <p>This directive determines whether or not proxy related information should be passed to the
1855     backend server through X-Forwarded-For, X-Forwarded-Host and X-Forwarded-Server HTTP headers.</p>
1856     <note><title>Effectiveness</title>
1857      <p>This option is of use only for HTTP proxying, as handled by <module>mod_proxy_http</module>.</p>
1858     </note>
1859 </usage>
1860 </directivesynopsis>
1861
1862 <directivesynopsis>
1863 <name>ProxySourceAddress</name>
1864 <description>Set local IP address for outgoing proxy connections</description>
1865 <syntax>ProxySourceAddress <var>address</var></syntax>
1866 <contextlist><context>server config</context>
1867 <context>virtual host</context>
1868 </contextlist>
1869 <compatibility>Available in version 2.3.9 and later</compatibility>
1870
1871 <usage>
1872     <p>This directive allows to set a specific local address to bind to when connecting
1873     to a backend server.</p>
1874 </usage>
1875 </directivesynopsis>
1876
1877 </modulesynopsis>