From ac715cb7f26a38427e10b7d4465dcedc16139b28 Mon Sep 17 00:00:00 2001 From: Christophe Jaillet Date: Sun, 28 Feb 2021 14:21:09 +0000 Subject: 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 --- docs/manual/mod/mod_proxy_ajp.xml | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) (limited to 'docs/manual') 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 @@ Simple Reverse Proxy - ProxyPass "/app" "ajp://backend.example.com:8009/app" +ProxyPass "/app" "ajp://backend.example.com:8009/app" + + + +

Options such as the secret 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 ProxyPass + or BalancerMember. This parameter + is available in Apache HTTP Server 2.4.42 and later:

+ Simple Reverse Proxy with <code>secret</code> option + +ProxyPass "/app" "ajp://backend.example.com:8009/app" secret=YOUR_AJP_SECRET

Balancers may also be used:

Balancer Reverse Proxy -<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"
Environment Variables

Environment variables whose names have the prefix AJP_ are forwarded to the origin server as AJP request attributes - (with the AJP_ prefix removed from the name of the key).

+ (with the AJP_ prefix removed from the name of the key).

Overview of the protocol @@ -477,7 +488,7 @@ attribute_value := (string) ?req_attribute0x0AStringName (the name of the attribute follows) ?ssl_key_size0x0BInteger - ?secret0x0CStringSent if secret is configured + ?secret0x0CStringSupported since 2.4.42 are_done0xFF-request_terminator

The context and servlet_path are not @@ -497,18 +508,18 @@ attribute_value := (string)

The jvm_route, is used to support sticky sessions -- associating a user's sesson with a particular Tomcat instance in the presence of multiple, load-balancing servers.

-

Beyond this list of basic attributes, any number of other attributes - can be sent via the req_attribute code 0x0A. - 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.

-

The secret is sent when the secret=secret_keyword parameter is - used in +

The secret is sent when the secret=secret_keyword + parameter is used in ProxyPass or BalancerMember directives. The backend needs to support secret and the values must match. request.secret or requiredSecret are documented in the AJP configuration of the Apache Tomcat.

+

Beyond this list of basic attributes, any number of other attributes + can be sent via the req_attribute code 0x0A. + 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.

Finally, after all the attributes have been sent, the attribute terminator, 0xFF, is sent. This signals both the end of the list of attributes and also then end of the Request Packet.

-- cgit v1.2.3