tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject Re: mod_jk and url rewriting+forwarding
Date Tue, 01 Apr 2008 20:55:32 GMT
David Smith schrieb:
> mod_jk doesn't use the HTTP protocol.  It uses the AJP13 protocol.  
> Unless you've done something unusual with your tomcat, the 8080 
> connector will be talking HTTP, not AJP.  Default AJP port is usually 
> 8009, so try 'worker.MyWorker.port=8009' in your workers.properties 
> file.  If you've changed the ajp connector's port config, then use that.
> 
> --David

And additionally: if you need to change the URL path between the request 
to Apache httpd and to the backend (in your case it looks like you want 
to prepend "/gqaf-web"), add mod_rewrite to your config, define a 
RewriteRule that changes the URL as required and put the passthrough 
flag [PT] directly after the RewriteRule.

Regards,

Rainer

> Melanie Pfefer wrote:
>> hi,
>>
>> I want to forward
>> http://proxy/gqaf:soi:PAR:TRE:0000001 (proxy is an
>> apache) to
>> http://backend:8080/gqaf-web/gqaf:soi:PAR:TRE:0000001
>> (backend:8080 is a tomcat server)
>>
>> I downloaded mod_jk and modified httpd.conf:
>>
>> LoadModule jk_module modules/mod_jk.so
>> JkWorkersFile
>> /usr/local/apache224/conf/workers.properties
>> JkLogFile "logs/mod_jk.log"
>> JkLogLevel debug
>> JkMount /*TRE* MyWorker
>>
>>
>>
>> and created workers.properties:
>>
>> workers.java_home=/usr/local/java/jdk1.6.0_03/
>> ps=/
>> worker.list=MyWorker
>>
>> worker.MyWorker.port=8080
>> worker.MyWorker.host=backend
>> worker.MyWorker.type=ajp13
>>
>>
>> From logs:
>>
>> [Tue Apr 01 21:33:48.890 2008] [27044:1] [debug]
>> ajp_send_request::jk_ajp_common.c (1395): (MyWorker)
>> request body to send 0 - request body to resend 0
>> [Tue Apr 01 21:34:08.897 2008] [27044:1] [error]
>> ajp_connection_tcp_get_message::jk_ajp_common.c
>> (1004): (MyWorker) can't receive the response message
>> from tomcat, tomcat (172.21.26.218:8080) has forced a
>> connection close for socket 19
>> [Tue Apr 01 21:34:08.897 2008] [27044:1] [error]
>> ajp_get_reply::jk_ajp_common.c (1766): (MyWorker)
>> Tomcat is down or refused connection. No response has
>> been sent to the client (yet)
>> [Tue Apr 01 21:34:08.897 2008] [27044:1] [info]
>> ajp_service::jk_ajp_common.c (2186): (MyWorker)
>> sending request to tomcat failed (recoverable), (attempt=2)
>> [Tue Apr 01 21:34:08.897 2008] [27044:1] [error]
>> ajp_service::jk_ajp_common.c (2204): (MyWorker)
>> Connecting to tomcat failed. Tomcat is probably not
>> started or is listening on the wrong port
>> [Tue Apr 01 21:34:08.897 2008] [27044:1] [debug]
>> ajp_reset_endpoint::jk_ajp_common.c (691): (MyWorker)
>> resetting endpoint with sd = 4294967295 (socket
>> shutdown)
>> [Tue Apr 01 21:34:08.897 2008] [27044:1] [debug]
>> ajp_done::jk_ajp_common.c (2522): recycling connection
>> pool slot=0 for worker MyWorker
>> [Tue Apr 01 21:34:08.897 2008] [27044:1] [info]
>> jk_handler::mod_jk.c (2364): Service error=0 for
>> worker=MyWorker
>>
>>
>> I checked tomcat and it is up.
>>
>> Any idea?
>> thanks

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


Mime
View raw message