diff options
author | Arno Töll <debian@toell.net> | 2012-01-08 22:53:17 +0100 |
---|---|---|
committer | Arno Töll <debian@toell.net> | 2012-01-08 22:53:17 +0100 |
commit | e072a2dd866b7cb9f14319b80326a4e7fd16fcdf (patch) | |
tree | a49dfc56d94a26011fe157835ff6cbe14edbd8a9 /docs/manual/mod/mod_proxy_ajp.html.en | |
parent | 0890390c00801651d08d3794e13b31a5dabbf5ef (diff) | |
download | apache2-e072a2dd866b7cb9f14319b80326a4e7fd16fcdf.tar.gz |
Imported Upstream version 2.3.16-beta
Diffstat (limited to 'docs/manual/mod/mod_proxy_ajp.html.en')
-rw-r--r-- | docs/manual/mod/mod_proxy_ajp.html.en | 58 |
1 files changed, 51 insertions, 7 deletions
diff --git a/docs/manual/mod/mod_proxy_ajp.html.en b/docs/manual/mod/mod_proxy_ajp.html.en index 7651dcfb..247c0712 100644 --- a/docs/manual/mod/mod_proxy_ajp.html.en +++ b/docs/manual/mod/mod_proxy_ajp.html.en @@ -13,11 +13,11 @@ <body> <div id="page-header"> <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> -<p class="apache">Apache HTTP Server Version 2.2</p> +<p class="apache">Apache HTTP Server Version 2.3</p> <img alt="" src="../images/feather.gif" /></div> <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div> <div id="path"> -<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.2</a> > <a href="./">Modules</a></div> +<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.3</a> > <a href="./">Modules</a></div> <div id="page-content"> <div id="preamble"><h1>Apache Module mod_proxy_ajp</h1> <div class="toplang"> @@ -32,7 +32,7 @@ <tr><th><a href="module-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.1 and later</td></tr></table> <h3>Summary</h3> - <p>This module <em>requires</em> the service of <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>. It provides support for the + <p>This module <em>requires</em> the service of <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>. It provides support for the <code>Apache JServ Protocol version 1.3</code> (hereafter <em>AJP13</em>).</p> @@ -51,6 +51,7 @@ directives.</p> <h3>Topics</h3> <ul id="topics"> +<li><img alt="" src="../images/down.gif" /> <a href="#usage">Usage</a></li> <li><img alt="" src="../images/down.gif" /> <a href="#env">Environment Variables</a></li> <li><img alt="" src="../images/down.gif" /> <a href="#overviewprotocol">Overview of the protocol</a></li> <li><img alt="" src="../images/down.gif" /> <a href="#basppacketstruct">Basic Packet Structure</a></li> @@ -63,9 +64,51 @@ </ul></div> <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> <div class="section"> +<h2><a name="usage" id="usage">Usage</a></h2> + <p>This module is used to reverse proxy to a backend application server + (e.g. Apache Tomcat) using the AJP13 protocol. The usage is similar to + an HTTP reverse proxy, but uses the <code>ajp://</code> prefix:</p> + + <div class="example"><h3>Simple Reverse Proxy</h3><p><code> + ProxyPass /app ajp://backend.example.com:8009/app + </code></p></div> + + <p>Balancers may also be used:</p> + <div class="example"><h3>Balancer Reverse Proxy</h3><p><code> + <Proxy balancer://cluster><br /> + <span class="indent"> + BalancerMember ajp://app1.example.com:8009 loadfactor=1<br /> + BalancerMember ajp://app2.example.com:8009 loadfactor=2<br /> + ProxySet lbmethod=bytraffic<br /> + </span> + </Proxy><br /> + ProxyPass /app balancer://cluster/app + </code></p></div> + + <p>Note that usually no + <code class="directive"><a href="../mod/mod_proxy.html#proxypassreverse">ProxyPassReverse</a></code> + directive is necessary. The AJP request includes the original host + header given to the proxy, and the application server can be expected + to generate self-referential headers relative to this host, so no + rewriting is necessary.</p> + + <p>The main exception is when the URL path on the proxy differs from that + on the + backend. In this case, a redirect header can be rewritten relative to the + original host URL (not the backend <code>ajp://</code> URL), for + example:</p> + <div class="example"><h3>Rewriting Proxied Path</h3><p><code> + ProxyPass /apps/foo ajp://backend.example.com:8009/foo<br /> + ProxyPassReverse /apps/foo http://www.example.com/foo + </code></p></div> + <p>However, it is usually better to deploy the application on the backend + server at the same path as the proxy rather than to take this approach. + </p> +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> +<div class="section"> <h2><a name="env" id="env">Environment Variables</a></h2> - <p>Environment variables whose names have the prefix <code>AJP_</code> - are forwarded to the origin server as AJP request attributes + <p>Environment variables whose names have the prefix <code>AJP_</code> + are forwarded to the origin server as AJP request attributes (with the AJP_ prefix removed from the name of the key).</p> </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> <div class="section"> @@ -309,7 +352,7 @@ AJP13_FORWARD_REQUEST := </pre></div> <p>The <code>request_headers</code> have the following structure: </p><div class="example"><pre> -req_header_name := +req_header_name := sc_req_header_name | (string) [see below for how this is parsed] sc_req_header_name := 0xA0xx (integer) @@ -365,7 +408,7 @@ attribute_value := (string) <tr><td>BASELINE_CONTROL</td><td>26</td></tr> <tr><td>MKACTIVITY</td><td>27</td></tr> </table> - <p>Later version of ajp13, will transport + <p>Later version of ajp13, will transport additional methods, even if they are not in this list.</p> <h3>protocol, req_uri, remote_addr, remote_host, server_name, @@ -483,6 +526,7 @@ AJP13_SEND_BODY_CHUNK := chunk *(byte) chunk_terminator (byte) Ox00 + AJP13_SEND_HEADERS := prefix_code 4 http_status_code (integer) |