diff options
author | Christophe Jaillet <jailletc36@apache.org> | 2021-02-28 15:21:09 +0100 |
---|---|---|
committer | Christophe Jaillet <jailletc36@apache.org> | 2021-02-28 15:21:09 +0100 |
commit | ac715cb7f26a38427e10b7d4465dcedc16139b28 (patch) | |
tree | c16ba0bdd79337d4814e37bd518e3395f28697ff /docs/manual | |
parent | Add missing pt translation (diff) | |
download | apache2-ac715cb7f26a38427e10b7d4465dcedc16139b28.tar.xz apache2-ac715cb7f26a38427e10b7d4465dcedc16139b28.zip |
Add an exemple.
Synch with 2.4.x (syntax highlight) + secret introduced in 2.4.42.
Small doc rearrangement so that the "Beyond this list of basic attributes" is actually after the description of all items.
[skip ci]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1886996 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual')
-rw-r--r-- | docs/manual/mod/mod_proxy_ajp.xml | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/docs/manual/mod/mod_proxy_ajp.xml b/docs/manual/mod/mod_proxy_ajp.xml index fb79babb5d..da143b0691 100644 --- a/docs/manual/mod/mod_proxy_ajp.xml +++ b/docs/manual/mod/mod_proxy_ajp.xml @@ -57,16 +57,27 @@ <example><title>Simple Reverse Proxy</title> <highlight language="config"> - ProxyPass "/app" "ajp://backend.example.com:8009/app" +ProxyPass "/app" "ajp://backend.example.com:8009/app" + </highlight> + </example> + + <p>Options such as the <code>secret</code> option of Tomcat (required by + default since Tomcat 8.5.51 and 9.0.31) can just be added as a separate + parameter at the end of <directive module="mod_proxy">ProxyPass</directive> + or <directive module="mod_proxy">BalancerMember</directive>. This parameter + is available in Apache HTTP Server 2.4.42 and later:</p> + <example><title>Simple Reverse Proxy with <code>secret</code> option</title> + <highlight language="config"> +ProxyPass "/app" "ajp://backend.example.com:8009/app" secret=YOUR_AJP_SECRET </highlight> </example> <p>Balancers may also be used:</p> <example><title>Balancer Reverse Proxy</title> <highlight language="config"> -<Proxy balancer://cluster> - BalancerMember ajp://app1.example.com:8009 loadfactor=1 - BalancerMember ajp://app2.example.com:8009 loadfactor=2 +<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" @@ -99,7 +110,7 @@ ProxyPassReverse "/apps/foo" "http://www.example.com/foo" <section id="env"><title>Environment Variables</title> <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> + (with the <code>AJP_</code> prefix removed from the name of the key).</p> </section> <section id="overviewprotocol"><title>Overview of the protocol</title> @@ -477,7 +488,7 @@ attribute_value := (string) <tr><td>?req_attribute</td><td>0x0A</td><td>String</td><td>Name (the name of the attribute follows)</td></tr> <tr><td>?ssl_key_size</td><td>0x0B</td><td>Integer</td><td></td></tr> - <tr><td>?secret</td><td>0x0C</td><td>String</td><td>Sent if secret is configured</td></tr> + <tr><td>?secret</td><td>0x0C</td><td>String</td><td>Supported since 2.4.42</td></tr> <tr><td>are_done</td><td>0xFF</td><td>-</td><td>request_terminator</td></tr> </table> <p>The <code>context</code> and <code>servlet_path</code> are not @@ -497,18 +508,18 @@ attribute_value := (string) <p>The <code>jvm_route</code>, is used to support sticky sessions -- associating a user's sesson with a particular Tomcat instance in the presence of multiple, load-balancing servers.</p> - <p>Beyond this list of basic attributes, any number of other attributes - can be sent via the <code>req_attribute</code> code <code>0x0A</code>. - A pair of strings to represent the attribute name and value are sent - immediately after each instance of that code. Environment values are passed - in via this method.</p> - <p>The <code>secret</code> is sent when the <code>secret=secret_keyword</code> parameter is - used in + <p>The <code>secret</code> is sent when the <code>secret=secret_keyword</code> + parameter is used in <directive module="mod_proxy">ProxyPass</directive> or <directive module="mod_proxy">BalancerMember</directive> directives. The backend needs to support secret and the values must match. <code>request.secret</code> or <code>requiredSecret</code> are documented in the AJP configuration of the Apache Tomcat.</p> + <p>Beyond this list of basic attributes, any number of other attributes + can be sent via the <code>req_attribute</code> code <code>0x0A</code>. + A pair of strings to represent the attribute name and value are sent + immediately after each instance of that code. Environment values are passed + in via this method.</p> <p>Finally, after all the attributes have been sent, the attribute terminator, <code>0xFF</code>, is sent. This signals both the end of the list of attributes and also then end of the Request Packet.</p> |