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