tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Wißmann <jochen.wissm...@kepol.com>
Subject Re: mod_jk how to add JK_WORKER_NAME to http-header
Date Tue, 26 Feb 2013 23:31:58 GMT
On 26.02.2013 23:52, Igor Cicimov wrote:
> On 27/02/2013 5:42 AM, "Jochen Wißmann" <jochen.wissmann@kepol.com> wrote:
>> Hello,
>>
>> i am trying to find an easy way to determine from the http-client side,
> which  AJP13-worker handled my request.
>> So my basic idea is to use mod_header to add mod_jk`s env-variable
> JK_WORKER_NAME to the Header of the http-response.
>> I tried to get something like this working:
>>
>> httpd.conf:
>> ...
>> Header add TC-Server "%{JK_WORKER_NAME}e"
> I think this should be
>
> Header add TC-Server "%{JK_WORKER_NAME}n"
>
> Please paste here the worker.properties file too.
>
>> ...
>>
>> All my previous attempts resulted in http-responses looking like this:
>>
>> < HTTP/1.1 200 OK
>> < Set-Cookie: ARPT=LRWQXVS110.160.11.26CKMLQ; path=/
>> < Date: Tue, 26 Feb 2013 18:25:31 GMT
>> < Server: Apache/2.2.22 (Unix) mod_jk/1.2.36 mod_ssl/2.2.22
> OpenSSL/0.9.8x DAV/2
>> < Set-Cookie: JSESSIONID=A4052BF60BA2007F0B0F47E2699AFDE.liferay0; Path=/
>> < Set-Cookie: GUEST_LANGUAGE_ID=en_US; Expires=Wed, 26-Feb-2014 18:25:31
> GMT; Path=/
>> < Set-Cookie: COOKIE_SUPPORT=true; Expires=Wed, 26-Feb-2014 18:25:31 GMT;
> Path=/
>> < Liferay-Portal: Liferay Portal Community Edition 6.0.6 CE (Bunyan /
> Build 6006 / February 17, 2011)
>> < ETag: "838b4ae2"
>> < Content-Length: 8043
>> < X-Server-Ip: 110.160.11.26
>> < TC-Server: (null)
>> < Content-Type: text/html;charset=utf-8
>>
>> Why do i get "TC-Server: (null)" ?
>> Using the Variable JK_WORKER_NAME to log the worker's name via
> mod_log_config works fine.
>> Am i missing something? Is it even possible to access the env-variable
> JK_WORKER_NAME with module mod_header?
>> Could anyone please help?
>> Thanks!
>>
>> Jochen
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
Hi Igor,

thanks for the tip, but using >Header add TC-Server 
"%{JK_WORKER_NAME}n"< as you suggested appears to be an invalid 
configuration:

# apachectl configtest

...
Syntax error on line 43 of /etc/apache2/sites-enabled/000-default:
Unrecognized header format %n
Action 'restart' failed.
...

Regards
Jochen

-- 
Jochen Wißmann
Head of operations

KEBA GmbH Automation
Vertretung der KEBA AG Linz
Adenauerallee 73
D-53113 Bonn, Germany

Phone +49/228/1848698014
Fax   +49/228/1848698015
Mailto: jochen.wissmann@agimatec.de
www.keba.com
Geschäftsführer:
Franz Berger, Thomas Linde, Michael Spatz Amtsgericht Ulm HRB 725943


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message