diff options
author | Stefan Fritsch <sf@sfritsch.de> | 2014-03-29 21:56:19 +0100 |
---|---|---|
committer | Stefan Fritsch <sf@sfritsch.de> | 2014-03-29 21:56:45 +0100 |
commit | 2a463b3cd73c32ee9dcd508248d0194923f435f4 (patch) | |
tree | 2ff478255a77a55031056790918b6f983bb7b20a /docs/manual/mod/mod_proxy_ajp.html.en | |
parent | 86d5cc79d9d6750da8771fdb0c9ab22c19b8ad45 (diff) | |
download | apache2-upstream/2.4.9.tar.gz |
Imported Upstream version 2.4.9upstream/2.4.9
Diffstat (limited to 'docs/manual/mod/mod_proxy_ajp.html.en')
-rw-r--r-- | docs/manual/mod/mod_proxy_ajp.html.en | 61 |
1 files changed, 25 insertions, 36 deletions
diff --git a/docs/manual/mod/mod_proxy_ajp.html.en b/docs/manual/mod/mod_proxy_ajp.html.en index c7de6bf5..14cb1260 100644 --- a/docs/manual/mod/mod_proxy_ajp.html.en +++ b/docs/manual/mod/mod_proxy_ajp.html.en @@ -9,7 +9,7 @@ <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> @@ -73,20 +73,16 @@ (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><pre class="prettyprint lang-config"> - ProxyPass /app ajp://backend.example.com:8009/app - </pre> + <div class="example"><h3>Simple Reverse Proxy</h3><pre class="prettyprint lang-config">ProxyPass /app ajp://backend.example.com:8009/app</pre> </div> <p>Balancers may also be used:</p> - <div class="example"><h3>Balancer Reverse Proxy</h3><pre class="prettyprint lang-config"> -<Proxy balancer://cluster> + <div class="example"><h3>Balancer Reverse Proxy</h3><pre class="prettyprint lang-config"><Proxy balancer://cluster> BalancerMember ajp://app1.example.com:8009 loadfactor=1 BalancerMember ajp://app2.example.com:8009 loadfactor=2 ProxySet lbmethod=bytraffic </Proxy> -ProxyPass /app balancer://cluster/app - </pre> +ProxyPass /app balancer://cluster/app</pre> </div> <p>Note that usually no @@ -101,10 +97,8 @@ ProxyPass /app balancer://cluster/app 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><pre class="prettyprint lang-config"> -ProxyPass /apps/foo ajp://backend.example.com:8009/foo -ProxyPassReverse /apps/foo http://www.example.com/foo - </pre> + <div class="example"><h3>Rewriting Proxied Path</h3><pre class="prettyprint lang-config">ProxyPass /apps/foo ajp://backend.example.com:8009/foo +ProxyPassReverse /apps/foo http://www.example.com/foo</pre> </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. @@ -208,11 +202,12 @@ ProxyPassReverse /apps/foo http://www.example.com/foo suggest that the maximum payload could be as large as 2^16, in fact, the code sets the maximum to be 8K.</p> <table> + <tr> - <td colspan="6"><em>Packet Format (Server->Container)</em></td> + <th colspan="6"><em>Packet Format (Server->Container)</em></th> </tr> <tr> - <td>Byte</td> + <th>Byte</th> <td>0</td> <td>1</td> <td>2</td> @@ -220,7 +215,7 @@ ProxyPassReverse /apps/foo http://www.example.com/foo <td>4...(n+3)</td> </tr> <tr> - <td>Contents</td> + <th>Contents</th> <td>0x12</td> <td>0x34</td> <td colspan="2">Data Length (n)</td> @@ -228,11 +223,12 @@ ProxyPassReverse /apps/foo http://www.example.com/foo </tr> </table> <table> + <tr> - <td colspan="6"><em>Packet Format (Container->Server)</em></td> + <th colspan="6"><em>Packet Format (Container->Server)</em></th> </tr> <tr> - <td>Byte</td> + <th>Byte</th> <td>0</td> <td>1</td> <td>2</td> @@ -240,7 +236,7 @@ ProxyPassReverse /apps/foo http://www.example.com/foo <td>4...(n+3)</td> </tr> <tr> - <td>Contents</td> + <th>Contents</th> <td>A</td> <td>B</td> <td colspan="2">Data Length (n)</td> @@ -255,6 +251,7 @@ ProxyPassReverse /apps/foo http://www.example.com/foo <p>The web server can send the following messages to the servlet container:</p> <table> + <tr> <td>Code</td> <td>Type of Packet</td> @@ -296,6 +293,7 @@ ProxyPassReverse /apps/foo http://www.example.com/foo <p>The servlet container can send the following types of messages to the webserver:</p> <table> + <tr> <td>Code</td> <td>Type of Packet</td> @@ -339,8 +337,7 @@ ProxyPassReverse /apps/foo http://www.example.com/foo <h2><a name="rpacetstruct" id="rpacetstruct">Request Packet Structure</a></h2> <p>For messages from the server to the container of type <em>Forward Request</em>:</p> - <div class="example"><pre> -AJP13_FORWARD_REQUEST := + <div class="example"><pre>AJP13_FORWARD_REQUEST := prefix_code (byte) 0x02 = JK_AJP13_FORWARD_REQUEST method (byte) protocol (string) @@ -353,25 +350,19 @@ AJP13_FORWARD_REQUEST := num_headers (integer) request_headers *(req_header_name req_header_value) attributes *(attribut_name attribute_value) - request_terminator (byte) OxFF - </pre></div> + request_terminator (byte) OxFF</pre></div> <p>The <code>request_headers</code> have the following structure: - </p><div class="example"><pre> -req_header_name := + </p><div class="example"><pre>req_header_name := sc_req_header_name | (string) [see below for how this is parsed] sc_req_header_name := 0xA0xx (integer) -req_header_value := (string) -</pre></div> +req_header_value := (string)</pre></div> <p>The <code>attributes</code> are optional and have the following structure:</p> - <div class="example"><pre> -attribute_name := sc_a_name | (sc_a_req_attribute string) + <div class="example"><pre>attribute_name := sc_a_name | (sc_a_req_attribute string) -attribute_value := (string) - - </pre></div> +attribute_value := (string)</pre></div> <p>Not that the all-important header is <code>content-length</code>, because it determines whether or not the container looks for another packet immediately.</p> @@ -524,8 +515,7 @@ attribute_value := (string) <div class="section"> <h2><a name="resppacketstruct" id="resppacketstruct">Response Packet Structure</a></h2> <p>for messages which the container can send back to the server.</p> - <div class="example"><pre> -AJP13_SEND_BODY_CHUNK := + <div class="example"><pre>AJP13_SEND_BODY_CHUNK := prefix_code 3 chunk_length (integer) chunk *(byte) @@ -553,8 +543,7 @@ AJP13_END_RESPONSE := AJP13_GET_BODY_CHUNK := prefix_code 6 - requested_length (integer) - </pre></div> + requested_length (integer)</pre></div> <h3>Details:</h3> <h3>Send Body Chunk</h3> <p>The chunk is basically binary data, and is sent directly back to the @@ -626,7 +615,7 @@ var comments_identifier = 'http://httpd.apache.org/docs/2.4/mod/mod_proxy_ajp.ht } })(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/directives.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(); |