tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <>
Subject Re: Apache httpd / tomcat AJP connector(s?)
Date Thu, 09 May 2019 08:37:28 GMT
Am 08.05.2019 um 10:14 schrieb Mark Thomas:
> On 07/05/2019 13:37, André Warnier (tomcat) wrote:
>> Hi.
>> On 26.04.2019 18:16, Mark Thomas wrote:
>>> On 24/04/2019 10:58, André Warnier (tomcat) wrote:
>>>> Hi.
>>>> This is somewhat of an arcane question and somewhat straddling httpd and
>>>> tomcat, so if I'm on the wrong list for this, just let me know.
>>> Here is fine. We can always move the thread if necessary.
>>>> The question is : is there any particular reason why the combination
>>>> mod_proxy + mod_proxy_ajp (in httpd), does not seem to follow the
>>>> ProxyPreserveHost directive, when proxying something from httpd to
>>>> tomcat ?
>>> None that I am aware of.
>>> I've complete a quick test with httpd 2.4.34 and Tomcat 9.0.x and I see
>>> the host header is passed via AJP as expected.
>>> I suggest wireshark to look at what is on the wire.
>> I haven't done a wireshark trace yet.
>> But as a cheap approximation for now, I tried to use the (tomcat) Access
>> Log to see what was going on, and there I hit another (but I believe
>> related) issue :
>> According to :
>> some patterns available are :
>> - %p - Local port on which this request was received.
>> and
>> - %{xxx}p write local (server) port (xxx==local) or remote (client) port
>> (xxx=remote)
>> So if I understand this right, "%{local}p" should print the same as
>> "%p", and both should be "the local port on which this request was
>> received".
> When using AJP the original values as received by httpd and passed by
> AJP are injected into the Tomcat request so things like redirects are
> generated correctly without additional configuration.
> It is one of those scenarios where things happen by "magic" which are
> great when it works bur can make debugging more complicated.
> Mark

Don't know whether it really helps, but long time ago I but some infos on

Concerning %p versus %{local}p and %{remote}p: I think the idea is %p is 
just the originally supported format and now also the short form of 
%{local}p. The various sub types of %p (local and remote) IMHO were 
added later similar to what the Apache web server supports.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message