]> granicus.if.org Git - apache/blobdiff - docs/manual/mod/mod_proxy.html.en
xforms
[apache] / docs / manual / mod / mod_proxy.html.en
index 038a0b1fe37ab7a9937add867490af8f48a457c5..cb845ec1d3655d06e9cb8cc532adc4420b0decc6 100644 (file)
@@ -5,11 +5,11 @@
               This file is generated from xml source: DO NOT EDIT
         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
       -->
-<title>mod_proxy - Apache HTTP Server</title>
+<title>mod_proxy - Apache HTTP Server Version 2.5</title>
 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
-<script src="../style/scripts/prettify.js" type="text/javascript">
+<script src="../style/scripts/prettify.min.js" type="text/javascript">
 </script>
 
 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
@@ -72,6 +72,7 @@
         <tr><td>HTTP/0.9, HTTP/1.0, and
           HTTP/1.1</td><td><code class="module"><a href="../mod/mod_proxy_http.html">mod_proxy_http</a></code></td></tr>
         <tr><td>SCGI</td><td><code class="module"><a href="../mod/mod_proxy_scgi.html">mod_proxy_scgi</a></code></td></tr>
+        <tr><td>WS and WSS (Web-sockets)</td><td><code class="module"><a href="../mod/mod_proxy_wstunnel.html">mod_proxy_wstunnel</a></code></td></tr>
         </table>
       </li>
     </ul>
 <li><img alt="" src="../images/down.gif" /> <a href="#forwardreverse">Forward Proxies and Reverse
        Proxies/Gateways</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#examples">Basic Examples</a></li>
+<li><img alt="" src="../images/down.gif" /> <a href="#handler">Access via Handler</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#workers">Workers</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#access">Controlling access to your proxy</a></li>
 <li><img alt="" src="../images/down.gif" /> <a href="#startup">Slow Startup</a></li>
 <li><code class="module"><a href="../mod/mod_proxy_ftp.html">mod_proxy_ftp</a></code></li>
 <li><code class="module"><a href="../mod/mod_proxy_http.html">mod_proxy_http</a></code></li>
 <li><code class="module"><a href="../mod/mod_proxy_scgi.html">mod_proxy_scgi</a></code></li>
+<li><code class="module"><a href="../mod/mod_proxy_wstunnel.html">mod_proxy_wstunnel</a></code></li>
 <li><code class="module"><a href="../mod/mod_proxy_balancer.html">mod_proxy_balancer</a></code></li>
 <li><code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code></li>
 </ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
     <p>In addition, if you wish to have caching enabled, consult
     the documentation from <code class="module"><a href="../mod/mod_cache.html">mod_cache</a></code>.</p>
 
-    <div class="example"><h3>Reverse Proxy</h3><pre class="prettyprint lang-config">
-ProxyPass /foo http://foo.example.com/bar
-ProxyPassReverse /foo http://foo.example.com/bar
-    </pre>
+    <div class="example"><h3>Reverse Proxy</h3><pre class="prettyprint lang-config">ProxyPass /foo http://foo.example.com/bar
+ProxyPassReverse /foo http://foo.example.com/bar</pre>
 </div>
 
-    <div class="example"><h3>Forward Proxy</h3><pre class="prettyprint lang-config">
-ProxyRequests On
+    <div class="example"><h3>Forward Proxy</h3><pre class="prettyprint lang-config">ProxyRequests On
 ProxyVia On
 
 &lt;Proxy *&gt;
   Require host internal.example.com
-&lt;/Proxy&gt;
-    </pre>
+&lt;/Proxy&gt;</pre>
 </div>
     </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="section">
+<h2><a name="handler" id="handler">Access via Handler</a></h2>
+
+      <p>You can also force a request to be handled as a reverse-proxy
+        request, by creating a suitable Handler pass-through. The example
+        configuration below will pass all requests for PHP scripts to the
+        specified FastCGI server using reverse proxy:
+      </p>
+
+      <div class="example"><h3>Reverse Proxy PHP scripts</h3><pre class="prettyprint lang-config">&lt;FilesMatch \.php$&gt;
+    SetHandler  "proxy:unix:/path/to/app.sock|fcgi://localhost/"
+&lt;/FilesMatch&gt;</pre>
+</div>
+
+      <p>This feature is available in Apache HTTP Server 2.4.10 and later.</p>
+
+    </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
+<div class="section">
 <h2><a name="workers" id="workers">Workers</a></h2>
       <p>The proxy manages the configuration of origin servers and their
       communication parameters in objects called <dfn>workers</dfn>.
@@ -235,9 +251,7 @@ ProxyVia On
       <code class="directive"><a href="#proxypassmatch">ProxyPassMatch</a></code> when used
       for a reverse proxy:</p>
 
-      <pre class="prettyprint lang-config">
-          ProxyPass /example http://backend.example.com connectiontimeout=5 timeout=30
-      </pre>
+      <pre class="prettyprint lang-config">ProxyPass /example http://backend.example.com connectiontimeout=5 timeout=30</pre>
 
 
       <p>This will create a worker associated with the origin server URL
@@ -245,19 +259,15 @@ ProxyVia On
       values. When used in a forward proxy, workers are usually defined
       via the <code class="directive"><a href="#proxyset">ProxySet</a></code> directive:</p>
 
-      <pre class="prettyprint lang-config">
-          ProxySet http://backend.example.com connectiontimeout=5 timeout=30
-      </pre>
+      <pre class="prettyprint lang-config">ProxySet http://backend.example.com connectiontimeout=5 timeout=30</pre>
 
 
       <p>or alternatively using <code class="directive"><a href="#proxy">Proxy</a></code>
       and <code class="directive"><a href="#proxyset">ProxySet</a></code>:</p>
 
-      <pre class="prettyprint lang-config">
-&lt;Proxy http://backend.example.com&gt;
+      <pre class="prettyprint lang-config">&lt;Proxy http://backend.example.com&gt;
   ProxySet connectiontimeout=5 timeout=30
-&lt;/Proxy&gt;
-      </pre>
+&lt;/Proxy&gt;</pre>
 
 
       <p>Using explicitly configured workers in the forward mode is
@@ -274,10 +284,8 @@ ProxyVia On
       <p>The URL identifying a direct worker is the URL of its
       origin server including any path components given:</p>
 
-     <pre class="prettyprint lang-config">
-ProxyPass /examples http://backend.example.com/examples
-ProxyPass /docs http://backend.example.com/docs
-      </pre>
+     <pre class="prettyprint lang-config">ProxyPass /examples http://backend.example.com/examples
+ProxyPass /docs http://backend.example.com/docs</pre>
 
 
       <p>This example defines two different workers, each using a separate
@@ -288,10 +296,8 @@ ProxyPass /docs http://backend.example.com/docs
         the URL of some worker is a leading substring of the URL of another
         worker defined later in the configuration file. In the following example</p>
 
-        <pre class="prettyprint lang-config">
-ProxyPass /apps http://backend.example.com/ timeout=60
-ProxyPass /examples http://backend.example.com/examples timeout=10
-        </pre>
+        <pre class="prettyprint lang-config">ProxyPass /apps http://backend.example.com/ timeout=60
+ProxyPass /examples http://backend.example.com/examples timeout=10</pre>
 
 
         <p>the second worker isn't actually created. Instead the first
@@ -338,11 +344,9 @@ ProxyPass /examples http://backend.example.com/examples timeout=10
       <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
       the following example:</p>
 
-      <pre class="prettyprint lang-config">
-&lt;Proxy *&gt;
+      <pre class="prettyprint lang-config">&lt;Proxy *&gt;
   Require ip 192.168.0
-&lt;/Proxy&gt;
-      </pre>
+&lt;/Proxy&gt;</pre>
 
 
       <p>For more information on access control directives, see
@@ -400,13 +404,11 @@ ProxyPass /examples http://backend.example.com/examples timeout=10
       <p>These are the <code>force-proxy-request-1.0</code> and
       <code>proxy-nokeepalive</code> notes.</p>
 
-      <pre class="prettyprint lang-config">
-&lt;Location /buggyappserver/&gt;
+      <pre class="prettyprint lang-config">&lt;Location /buggyappserver/&gt;
   ProxyPass http://buggyappserver:7001/foo/
   SetEnv force-proxy-request-1.0 1
   SetEnv proxy-nokeepalive 1
-&lt;/Location&gt;
-        </pre>
+&lt;/Location&gt;</pre>
 
 
     </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
@@ -470,6 +472,11 @@ ProxyPass /examples http://backend.example.com/examples timeout=10
     <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
     other request headers.</p>
 
+    <p>Note:  If you need to specify custom request headers to be
+    added to the forwarded request, use the 
+    <code class="directive"><a href="../mod/mod_headers.html#requestheader">RequestHeader</a></code>
+    directive.</p>
+
    </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
 <div class="directive-section"><h2><a name="BalancerGrowth" id="BalancerGrowth">BalancerGrowth</a> <a name="balancergrowth" id="balancergrowth">Directive</a></h2>
@@ -498,8 +505,7 @@ ProxyPass /examples http://backend.example.com/examples timeout=10
 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
-<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>BalancerInherit is only available in Apache HTTP Server 2.4.4 and later.
-        and later.</td></tr>
+<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>BalancerInherit is only available in Apache HTTP Server 2.4.5 and later.</td></tr>
 </table>
         <p>This directive will cause the current server/vhost to "inherit"
             Balancers and Workers defined in the main server. This can cause issues and
@@ -522,18 +528,18 @@ ProxyPass /examples http://backend.example.com/examples timeout=10
             within a <code>&lt;Proxy <var>balancer://</var>...&gt;</code> container
             directive, and can take any of the key value pair parameters available to
             <code class="directive"><a href="#proxypass">ProxyPass</a></code> directives.</p>
-        <p>One additional parameter is available only to <code class="directive"><a href="#balancermember">BalancerMember</a></code> directives:
+        <p>One additional parameter is available only to <code class="directive">BalancerMember</code> directives:
             <var>loadfactor</var>. This is the member load factor - a number between 1
             (default) and 100, which defines the weighted load to be applied to the
             member in question.</p>
-        <p>The balancerurl is only needed when not in <code>&lt;Proxy <var>balancer://</var>...&gt;</code>
+        <p>The <var>balancerurl</var> is only needed when not in <code>&lt;Proxy <var>balancer://</var>...&gt;</code>
             container directive. It corresponds to the url of a balancer defined in
             <code class="directive"><a href="#proxypass">ProxyPass</a></code> directive.</p>
         <p>The path component of the balancer URL in any
             <code>&lt;Proxy <var>balancer://</var>...&gt;</code> container directive
             is ignored.</p>
         <p>Trailing slashes should typically be removed from the URL of a
-            <code>BalancerMember</code>.</p>
+            <code class="directive">BalancerMember</code>.</p>
     
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
@@ -545,8 +551,7 @@ ProxyPass /examples http://backend.example.com/examples timeout=10
 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
-<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>BalancerPersist is only available in Apache HTTP Server 2.5.0
-        and later.</td></tr>
+<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>BalancerPersist is only available in Apache HTTP Server 2.4.4 and later.</td></tr>
 </table>
         <p>This directive will cause the shared memory storage associated
         with the balancers and balancer members to be persisted across
@@ -571,10 +576,8 @@ directly</td></tr>
     always served directly, without forwarding to the configured
     <code class="directive"><a href="#proxyremote">ProxyRemote</a></code> proxy server(s).</p>
 
-    <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">
-ProxyRemote  *  http://firewall.example.com:81
-NoProxy         .example.com 192.168.112.0/21
-    </pre>
+    <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">ProxyRemote  *  http://firewall.example.com:81
+NoProxy         .example.com 192.168.112.0/21</pre>
 </div>
 
     <p>The <var>host</var> arguments to the <code class="directive">NoProxy</code>
@@ -697,23 +700,31 @@ NoProxy         .example.com 192.168.112.0/21
     <code>yournetwork.example.com</code> to access content via your proxy
     server:</p>
 
-    <pre class="prettyprint lang-config">
-&lt;Proxy *&gt;
+    <pre class="prettyprint lang-config">&lt;Proxy *&gt;
   Require host yournetwork.example.com
-&lt;/Proxy&gt;
-    </pre>
+&lt;/Proxy&gt;</pre>
 
 
     <p>The following example will process all files in the <code>foo</code>
     directory of <code>example.com</code> through the <code>INCLUDES</code>
     filter when they are sent through the proxy server:</p>
 
-   <pre class="prettyprint lang-config">    
-&lt;Proxy http://example.com/foo/*&gt;
+   <pre class="prettyprint lang-config">&lt;Proxy http://example.com/foo/*&gt;
   SetOutputFilter INCLUDES
-&lt;/Proxy&gt;
-    </pre>
-
+&lt;/Proxy&gt;</pre>
+
+
+    <div class="note"><h3>Differences from the Location configuration section</h3>
+      <p>A backend URL matches the configuration section if it begins with the 
+      the <var>wildcard-url</var> string, even if the last path segment in the
+      directive only matches a prefix of the backend URL.  For example, 
+      &lt;Proxy http://example.com/foo&gt; matches all of 
+      http://example.com/foo, http://example.com/foo/bar, and 
+      http://example.com/foobar.  The matching of the final URL differs
+      from the behavior of the <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code> section, which for purposes of this note 
+      treats the final path component as if it ended in a slash.</p>
+      <p>For more control over the matching, see <code class="directive">&lt;ProxyMatch&gt;</code>.</p>
+    </div>
 
 
 <h3>See also</h3>
@@ -809,9 +820,7 @@ response</td></tr>
     <p>Note that the DNS lookups may slow down the startup time of the
     server.</p>
 
-    <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">
-      ProxyBlock news.example.com auctions.example.com friends.example.com
-      </pre>
+    <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">ProxyBlock news.example.com auctions.example.com friends.example.com</pre>
 </div>
 
     <p>Note that <code>example</code> would also be sufficient to match any
@@ -821,9 +830,7 @@ response</td></tr>
 
     <p>Note also that</p>
 
-    <pre class="prettyprint lang-config">
-      ProxyBlock *
-    </pre>
+    <pre class="prettyprint lang-config">ProxyBlock *</pre>
 
 
     <p>blocks connections to all sites.</p>
@@ -845,11 +852,9 @@ response</td></tr>
     response to the same host with the configured <var>Domain</var> appended
     will be generated.</p>
 
-    <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">
-      ProxyRemote  *  http://firewall.example.com:81<br />
+    <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">      ProxyRemote  *  http://firewall.example.com:81<br />
       NoProxy         .example.com 192.168.112.0/21<br />
-      ProxyDomain     .example.com
-      </pre>
+      ProxyDomain     .example.com</pre>
 </div>
 
 </div>
@@ -918,6 +923,18 @@ proxied resources</td></tr>
     identical to the <code class="directive"><a href="#proxy">&lt;Proxy&gt;</a></code> directive, except it matches URLs
     using <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular expressions</a>.</p>
 
+    <p>From 2.4.8 onwards, named groups and backreferences are captured and
+    written to the environment with the corresponding name prefixed with
+    "MATCH_" and in upper case. This allows elements of URLs to be referenced
+    from within <a href="../expr.html">expressions</a> and modules like
+    <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>. In order to prevent confusion, numbered
+    (unnamed) backreferences are ignored. Use named groups instead.</p>
+
+<pre class="prettyprint lang-config">&lt;ProxyMatch ^http://(?&lt;sitename&gt;[^/]+)&gt;
+    require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
+&lt;/ProxyMatch&gt;</pre>
+
+
 <h3>See also</h3>
 <ul>
 <li><code class="directive"><a href="#proxy">&lt;Proxy&gt;</a></code></li>
@@ -939,9 +956,7 @@ through</td></tr>
     <code>Max-Forwards</code> header supplied with the request. This may
     be set to prevent infinite proxy loops, or a DoS attack.</p>
 
-    <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">
-      ProxyMaxForwards 15
-      </pre>
+    <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">ProxyMaxForwards 15</pre>
 </div>
 
     <p>Note that setting <code class="directive">ProxyMaxForwards</code> is a
@@ -970,7 +985,7 @@ through</td></tr>
     proxy</dfn> or <dfn>gateway</dfn>. The <var>path</var> is the name of
     a local virtual path; <var>url</var> is a partial URL for the
     remote server and cannot include a query string.</p>
-    
+
     <div class="note"><strong>Note: </strong>This directive cannot be used within a 
     <code>&lt;Directory&gt;</code> context.</div>
 
@@ -978,14 +993,26 @@ through</td></tr>
     usually be set <strong>off</strong> when using
     <code class="directive">ProxyPass</code>.</div>
 
+    <p>Support for using a Unix Domain Socket is available by using a url target
+    which prepends <code>unix:/path/lis.sock|</code>. For example, to proxy
+    HTTP and target the UDS at /home/www/socket you would use
+    <code>unix:/home/www.socket|http://localhost/whatever/</code>. Since
+    the socket is local, the hostname used (in this case <code>localhost</code>)
+    is moot, but it is passed as the Host: header value of the request.</p>
+
+    <div class="note"><strong>Note:</strong> The path associated with the <code>unix:</code>
+    URL is <code class="directive">DefaultRuntimeDir</code> aware.</div>
+
+    <div class="note"><strong>Note:</strong> <code class="directive">RewriteRule</code> requires
+    the <code>[P,NE]</code> option to prevent the <code>'|'</code> character
+    from being escaped.</div>
+
     <p>Suppose the local server has address <code>http://example.com/</code>;
     then</p>
 
-    <pre class="prettyprint lang-config">
-&lt;Location /mirror/foo/&gt;
+    <pre class="prettyprint lang-config">&lt;Location /mirror/foo/&gt;
     ProxyPass http://backend.example.com/
-&lt;/Location&gt;
-    </pre>
+&lt;/Location&gt;</pre>
 
 
     <p>will cause a local request for
@@ -997,9 +1024,7 @@ through</td></tr>
     the below syntax is that it allows for dynamic control via the
     <a href="mod_proxy_balancer.html#balancer_manager">Balancer Manager</a> interface:</p>
 
-    <pre class="prettyprint lang-config">
-        ProxyPass /mirror/foo/ http://backend.example.com/
-    </pre>
+    <pre class="prettyprint lang-config">ProxyPass /mirror/foo/ http://backend.example.com/</pre>
 
 
     <div class="warning">
@@ -1013,20 +1038,16 @@ through</td></tr>
     <p>The <code>!</code> directive is useful in situations where you don't want
     to reverse-proxy a subdirectory, <em>e.g.</em></p>
 
-    <pre class="prettyprint lang-config">
-&lt;Location /mirror/foo/&gt;
+    <pre class="prettyprint lang-config">&lt;Location /mirror/foo/&gt;
     ProxyPass http://backend.example.com/
 &lt;/Location&gt;
 &lt;Location /mirror/foo/i&gt;
     ProxyPass !
-&lt;/Location&gt;
-    </pre>
+&lt;/Location&gt;</pre>
 
 
-    <pre class="prettyprint lang-config">
-ProxyPass /mirror/foo/i !
-ProxyPass /mirror/foo http://backend.example.com
-    </pre>
+    <pre class="prettyprint lang-config">ProxyPass /mirror/foo/i !
+ProxyPass /mirror/foo http://backend.example.com</pre>
 
 
     <p>will proxy all requests to <code>/mirror/foo</code> to
@@ -1073,9 +1094,7 @@ ProxyPass /mirror/foo http://backend.example.com
     among all child processes, except when only one child process is allowed
     by configuration or MPM design.</p>
 
-    <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">
-        ProxyPass /example http://backend.example.com max=20 ttl=120 retry=300
-        </pre>
+    <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">ProxyPass /example http://backend.example.com max=20 ttl=120 retry=300</pre>
 </div>
 
     <table class="bordered"><tr><th>BalancerMember parameters</th></tr></table>
@@ -1173,7 +1192,9 @@ ProxyPass /mirror/foo http://backend.example.com
     <tr><td>ping</td>
         <td>0</td>
         <td>Ping property tells the webserver to "test" the connection to
-        the backend before forwarding the request. For AJP, it causes
+        the backend before forwarding the request. For negative values
+        the test is a simple socket check, for positive values it's
+        a more functional check, dependent upon the protocol. For AJP, it causes
         <code class="module"><a href="../mod/mod_proxy_ajp.html">mod_proxy_ajp</a></code>to send a <code>CPING</code>
         request on the ajp13 connection (implemented on Tomcat 3.3.2+, 4.1.28+
         and 5.0.13+). For HTTP, it causes <code class="module"><a href="../mod/mod_proxy_http.html">mod_proxy_http</a></code>
@@ -1290,7 +1311,8 @@ ProxyPass /mirror/foo http://backend.example.com
         and it depends on the backend application server that support sessions.
         If the backend application server uses different name for cookies
         and url encoded id (like servlet containers) use | to to separate them.
-        The first part is for the cookie the second for the path.
+        The first part is for the cookie the second for the path.<br />
+        Available in Apache HTTP Server 2.4.4 and later.
     </td></tr>
     <tr><td>stickysessionsep</td>
         <td>"."</td>
@@ -1321,7 +1343,8 @@ ProxyPass /mirror/foo http://backend.example.com
         <td>Off</td>
         <td>If set, an IO read timeout after a request is sent to the backend will
         force the worker into error state. Worker recovery behaves the same as other
-        worker errors.
+        worker errors.<br />
+        Available in Apache HTTP Server 2.4.5 and later.
     </td></tr>
     <tr><td>nonce</td>
         <td>&lt;auto&gt;</td>
@@ -1347,35 +1370,32 @@ ProxyPass /mirror/foo http://backend.example.com
         in error state. There might be cases where an already overloaded backend
         can get into deeper trouble if the recovery of all workers is enforced
         without considering the retry parameter of each worker. In this case
-        set to <code>Off</code>.
+        set to <code>Off</code>.<br />
+        Available in Apache HTTP Server 2.4.2 and later.
     </td></tr>
 
     </table>
     <p>A sample balancer setup</p>
-    <pre class="prettyprint lang-config">
-ProxyPass /special-area http://special.example.com smax=5 max=10
+    <pre class="prettyprint lang-config">ProxyPass /special-area http://special.example.com smax=5 max=10
 ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On
 &lt;Proxy balancer://mycluster&gt;
     BalancerMember ajp://1.2.3.4:8009
     BalancerMember ajp://1.2.3.5:8009 loadfactor=20
     # Less powerful server, don't send as many requests there,
     BalancerMember ajp://1.2.3.6:8009 loadfactor=5
-&lt;/Proxy&gt;
-    </pre>
+&lt;/Proxy&gt;</pre>
 
 
     <p>Setting up a hot-standby, that will only be used if no other
      members are available</p>
-    <pre class="prettyprint lang-config">
-ProxyPass / balancer://hotcluster/
+    <pre class="prettyprint lang-config">ProxyPass / balancer://hotcluster/
 &lt;Proxy balancer://hotcluster&gt;
     BalancerMember ajp://1.2.3.4:8009 loadfactor=1
     BalancerMember ajp://1.2.3.5:8009 loadfactor=2
     # The server below is on hot standby
     BalancerMember ajp://1.2.3.6:8009 status=+H
     ProxySet lbmethod=bytraffic
-&lt;/Proxy&gt;
-    </pre>
+&lt;/Proxy&gt;</pre>
 
 
     <p>Normally, mod_proxy will canonicalise ProxyPassed URLs.
@@ -1386,15 +1406,6 @@ ProxyPass / balancer://hotcluster/
     removes the normal limited protection against URL-based attacks
     provided by the proxy.</p>
 
-    <p>The optional <var>interpolate</var> keyword (available in
-    httpd 2.2.9 and later), in combination with
-    <code class="directive">ProxyPassInterpolateEnv</code> causes the ProxyPass
-    to interpolate environment variables, using the syntax
-    <var>${VARNAME}</var>.  Note that many of the standard CGI-derived
-    environment variables will not exist when this interpolation happens,
-    so you may still have to resort to <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>
-    for complex rules.</p>
-
     <p>Normally, mod_proxy will include the query string when
     generating the <var>SCRIPT_FILENAME</var> environment variable.
     The optional <var>noquery</var> keyword (available in
@@ -1412,6 +1423,28 @@ ProxyPass / balancer://hotcluster/
     <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> directive with the
     <code>[P]</code> flag.</p>
 
+    <p>The optional <var>interpolate</var> keyword, in combination with
+    <code class="directive">ProxyPassInterpolateEnv</code> causes the ProxyPass
+    to interpolate environment variables, using the syntax
+    <var>${VARNAME}</var>.  Note that many of the standard CGI-derived
+    environment variables will not exist when this interpolation happens,
+    so you may still have to resort to <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>
+    for complex rules.  Also note that interpolation is not supported
+    within the scheme portion of a URL.  Dynamic determination of the
+    scheme can be accomplished with <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> as in the
+    following example.</p>
+
+    <pre class="prettyprint lang-config">RewriteEngine On
+
+RewriteCond %{HTTPS} =off
+RewriteRule . - [E=protocol:http]
+RewriteCond %{HTTPS} =on
+RewriteRule . - [E=protocol:https]
+
+RewriteRule ^/mirror/foo/(.*) %{ENV:protocol}://backend.example.com/$1 [P]
+ProxyPassReverse  /mirror/foo/ http://backend.example.com/
+ProxyPassReverse  /mirror/foo/ https://backend.example.com/</pre>
+
 
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
@@ -1423,7 +1456,7 @@ ProxyPass / balancer://hotcluster/
 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy</td></tr>
-<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>ProxyPassInherit is only available in Apache HTTP Server 2.5.0 and later.
+<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>ProxyPassInherit is only available in Apache HTTP Server 2.4.5 and later.
         and later.</td></tr>
 </table>
         <p>This directive will cause the current server/vhost to "inherit"
@@ -1484,9 +1517,7 @@ ProxyPass / balancer://hotcluster/
     <p>Suppose the local server has address <code>http://example.com/</code>;
     then</p>
 
-    <pre class="prettyprint lang-config">
-      ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com$1
-    </pre>
+    <pre class="prettyprint lang-config">ProxyPassMatch ^/(.*\.gif)$ http://backend.example.com/$1</pre>
 
 
     <p>will cause a local request for
@@ -1496,16 +1527,12 @@ ProxyPass / balancer://hotcluster/
       <p>The URL argument must be parsable as a URL <em>before</em> regexp
       substitutions (as well as after).  This limits the matches you can use.
       For instance, if we had used</p>
-      <pre class="prettyprint lang-config">
-        ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com:8000$1
-      </pre>
+      <pre class="prettyprint lang-config">ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com:8000$1</pre>
 
       <p>in our previous example, it would fail with a syntax error
       at server startup.  This is a bug (PR 46665 in the ASF bugzilla),
       and the workaround is to reformulate the match:</p>
-      <pre class="prettyprint lang-config">
-        ProxyPassMatch ^/(.*\.gif)$ http://backend.example.com:8000/$1
-      </pre>
+      <pre class="prettyprint lang-config">ProxyPassMatch ^/(.*\.gif)$ http://backend.example.com:8000/$1</pre>
 
     </div>
     <p>The <code>!</code> directive is useful in situations where you don't want
@@ -1518,6 +1545,13 @@ ProxyPass / balancer://hotcluster/
     <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> directive with the
     <code>[P]</code> flag.</p>
 
+    <div class="note">
+      <h3>Default Substitution</h3>
+      <p>When the URL parameter doesn't use any backreferences into the regular
+      expression, the original URL will be appended to the URL parameter.
+      </p>
+    </div>
+
     <div class="warning">
       <h3>Security Warning</h3>
       <p>Take care when constructing the target URL of the rule, considering
@@ -1561,12 +1595,10 @@ proxied server</td></tr>
     <p>For example, suppose the local server has address
     <code>http://example.com/</code>; then</p>
 
-    <pre class="prettyprint lang-config">
-ProxyPass         /mirror/foo/ http://backend.example.com/
+    <pre class="prettyprint lang-config">ProxyPass         /mirror/foo/ http://backend.example.com/
 ProxyPassReverse  /mirror/foo/ http://backend.example.com/
 ProxyPassReverseCookieDomain  backend.example.com  public.example.com
-ProxyPassReverseCookiePath  /  /mirror/foo/
-    </pre>
+ProxyPassReverseCookiePath  /  /mirror/foo/</pre>
 
 
     <p>will not only cause a local request for the
@@ -1585,11 +1617,11 @@ ProxyPassReverseCookiePath  /  /mirror/foo/
     (<code>RewriteRule ...  [P]</code>) from <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>
     because it doesn't depend on a corresponding <code class="directive"><a href="#proxypass">ProxyPass</a></code> directive.</p>
 
-    <p>The optional <var>interpolate</var> keyword (available in
-    httpd 2.2.9 and later), used together with
+    <p>The optional <var>interpolate</var> keyword, used together with
     <code class="directive">ProxyPassInterpolateEnv</code>, enables interpolation
     of environment variables specified using the format <var>${VARNAME}</var>.
-    </p>
+    Note that interpolation is not supported within the scheme portion of a
+    URL.</p>
 
     <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
     directory is obtained from the <code class="directive"><a href="../mod/core.html#location">&lt;Location&gt;</a></code>. The same occurs inside a <code class="directive"><a href="../mod/core.html#locationmatch">&lt;LocationMatch&gt;</a></code> section, but will probably not work as
@@ -1640,9 +1672,7 @@ reverse proxy. This directive rewrites the <code>path</code> string in
 In the example given with 
 <code class="directive"><a href="#proxypassreverse">ProxyPassReverse</a></code>, the directive:
 </p>
-    <pre class="prettyprint lang-config">
-      ProxyPassReverseCookiePath  /  /mirror/foo/
-    </pre>
+    <pre class="prettyprint lang-config">ProxyPassReverseCookiePath  /  /mirror/foo/</pre>
 
 <p>
 will rewrite a cookie with backend path <code>/</code> (or
@@ -1690,9 +1720,7 @@ connections</td></tr>
     to <code>0</code> to indicate that the system's default buffer size should
     be used.</p>
 
-    <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">
-      ProxyReceiveBufferSize 2048
-      </pre>
+    <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">ProxyReceiveBufferSize 2048</pre>
 </div>
 
 </div>
@@ -1721,11 +1749,9 @@ connections</td></tr>
     are supported by this module. When using <code>https</code>, the requests
     are forwarded through the remote proxy using the HTTP CONNECT method.</p>
 
-    <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">
-ProxyRemote http://goodguys.example.com/ http://mirrorguys.example.com:8000
+    <div class="example"><h3>Example</h3><pre class="prettyprint lang-config">ProxyRemote http://goodguys.example.com/ http://mirrorguys.example.com:8000
 ProxyRemote * http://cleverproxy.localdomain
-ProxyRemote ftp http://ftpproxy.mydomain:8080
-    </pre>
+ProxyRemote ftp http://ftpproxy.mydomain:8080</pre>
 </div>
 
     <p>In the last example, the proxy will forward FTP requests, encapsulated
@@ -1807,30 +1833,22 @@ expressions</td></tr>
     <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> instead of a
     <code class="directive"><a href="#proxypass">ProxyPass</a></code> directive.</p>
 
-    <div class="example"><pre class="prettyprint lang-config">
-&lt;Proxy balancer://hotcluster&gt;
+    <div class="example"><pre class="prettyprint lang-config">&lt;Proxy balancer://hotcluster&gt;
     BalancerMember http://www2.example.com:8080 loadfactor=1
     BalancerMember http://www3.example.com:8080 loadfactor=2
     ProxySet lbmethod=bytraffic
-&lt;/Proxy&gt;
-      </pre>
+&lt;/Proxy&gt;</pre>
 </div>
 
-    <pre class="prettyprint lang-config">
-&lt;Proxy http://backend&gt;
+    <pre class="prettyprint lang-config">&lt;Proxy http://backend&gt;
     ProxySet keepalive=On
-&lt;/Proxy&gt;
-    </pre>
+&lt;/Proxy&gt;</pre>
 
 
-    <pre class="prettyprint lang-config">
-        ProxySet balancer://foo lbmethod=bytraffic timeout=15
-    </pre>
+    <pre class="prettyprint lang-config">ProxySet balancer://foo lbmethod=bytraffic timeout=15</pre>
 
 
-    <pre class="prettyprint lang-config">
-        ProxySet ajp://backend:7001 timeout=15
-    </pre>
+    <pre class="prettyprint lang-config">ProxySet ajp://backend:7001 timeout=15</pre>
 
 
    <div class="warning"><h3>Warning</h3>
@@ -1947,7 +1965,7 @@ var comments_identifier = 'http://httpd.apache.org/docs/trunk/mod/mod_proxy.html
     }
 })(window, document);
 //--><!]]></script></div><div id="footer">
-<p class="apache">Copyright 2013 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>
+<p class="apache">Copyright 2014 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>
 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
 if (typeof(prettyPrint) !== 'undefined') {
     prettyPrint();