Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 18485 invoked from network); 1 Apr 2008 20:56:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Apr 2008 20:56:20 -0000 Received: (qmail 38392 invoked by uid 500); 1 Apr 2008 20:56:10 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 37859 invoked by uid 500); 1 Apr 2008 20:56:08 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 37848 invoked by uid 99); 1 Apr 2008 20:56:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Apr 2008 13:56:08 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [195.227.30.149] (HELO mailserver.kippdata.de) (195.227.30.149) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Apr 2008 20:55:27 +0000 Received: from [192.168.2.112] ([192.168.2.112]) by mailserver.kippdata.de (8.13.5/8.13.5) with ESMTP id m31KtZ67026395 for ; Tue, 1 Apr 2008 22:55:36 +0200 (CEST) Message-ID: <47F2A144.4090406@kippdata.de> Date: Tue, 01 Apr 2008 22:55:32 +0200 From: Rainer Jung User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: mod_jk and url rewriting+forwarding References: <971280.11333.qm@web26212.mail.ukl.yahoo.com> <47F2929B.5020500@cornell.edu> In-Reply-To: <47F2929B.5020500@cornell.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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