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