diff options
author | Stefan Fritsch <sf@sfritsch.de> | 2012-01-29 13:30:57 +0100 |
---|---|---|
committer | Stefan Fritsch <sf@sfritsch.de> | 2012-01-29 13:30:57 +0100 |
commit | d1d018768afd79cb2ecd1805f0d8f3ed23f4076b (patch) | |
tree | 04d53b0a9786234f3bbd3badffdb22dbe2b74d03 /docs/manual/mod/mod_proxy_ajp.html.en | |
parent | 0890390c00801651d08d3794e13b31a5dabbf5ef (diff) | |
download | apache2-d1d018768afd79cb2ecd1805f0d8f3ed23f4076b.tar.gz |
Upstream tarball 2.2.22upstream/2.2.22
Diffstat (limited to 'docs/manual/mod/mod_proxy_ajp.html.en')
-rw-r--r-- | docs/manual/mod/mod_proxy_ajp.html.en | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/docs/manual/mod/mod_proxy_ajp.html.en b/docs/manual/mod/mod_proxy_ajp.html.en index 7651dcfb..061a0b88 100644 --- a/docs/manual/mod/mod_proxy_ajp.html.en +++ b/docs/manual/mod/mod_proxy_ajp.html.en @@ -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,6 +64,49 @@ </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 @@ -559,6 +603,6 @@ AJP13_GET_BODY_CHUNK := <p><span>Available Languages: </span><a href="../en/mod/mod_proxy_ajp.html" title="English"> en </a> | <a href="../ja/mod/mod_proxy_ajp.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a></p> </div><div id="footer"> -<p class="apache">Copyright 2011 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 2012 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/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div> </body></html>
\ No newline at end of file |