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