Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 66230 invoked from network); 4 Dec 2009 08:31:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Dec 2009 08:31:47 -0000 Received: (qmail 20702 invoked by uid 500); 4 Dec 2009 08:31:43 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 20622 invoked by uid 500); 4 Dec 2009 08:31:42 -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 20611 invoked by uid 99); 4 Dec 2009 08:31:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Dec 2009 08:31:42 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of group.vas@gmail.com designates 209.85.223.199 as permitted sender) Received: from [209.85.223.199] (HELO mail-iw0-f199.google.com) (209.85.223.199) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Dec 2009 08:31:40 +0000 Received: by iwn37 with SMTP id 37so1761299iwn.30 for ; Fri, 04 Dec 2009 00:31:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=FKQs3Jpsty6lszimdLV0JT+57bKBLyiYcum+V+JXf/0=; b=BOJhwqHn9aSHyDRCuyMulKaXXgpteHC/U0eO0Mkav2mecWB+yApG7tC9NDTcLNdai8 MCLkYspsvtrdVBWQjlHcS0xPBg66chvxFLjdjdO+N99K5fNVSrm+XhEKuHimMGrzNMIh tMPLYhYYvg1LCBgKLkgLdHou4gXrOne16J/p4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=YveGyZ/VGGF2lr7XN6BYHoeSQ8Cwa9/wNBeD+6AdCwCBcY85OBfB9uTetOLiKv+bFH EuH8IqZPUMXo5Qq1W+zkCC1Z/rGwz0CJXzQlFN4hobb8fXQ1kNyB/+gLk+6tb5KXuf4e d707xqT+5iCceYQ8wv8IfIKCUqYEcI7b4wG8Q= MIME-Version: 1.0 Received: by 10.231.170.136 with SMTP id d8mr2319683ibz.17.1259915477581; Fri, 04 Dec 2009 00:31:17 -0800 (PST) In-Reply-To: <4B16E699.7030300@ice-sa.com> References: <4B15358C.3050305@ice-sa.com> <4B15CD1B.2020609@christopherschultz.net> <4B1641DB.6080506@ice-sa.com> <4B16E699.7030300@ice-sa.com> Date: Fri, 4 Dec 2009 00:31:17 -0800 Message-ID: Subject: Re: Debugging tomcat<->apache(mod_jk) bridge From: groupalias v To: Tomcat Users List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I got busy at work and could not get back with information. Chris, The inconsistencies you have pointed out are my mistake in the email trying to clean up the URLs to shorten the strings and to remove machine specific identifying information. The config files are consistent and I still get the error. Andr=E9, Thanks for the detailed information. I did not try the SetHandler way of configration and gave up on using mod_jk. I recompiled apache to include the mod_proxy_ajp and got tomcat to respond to the URL request right away in the first try. Then again I have different kinds of problems with this. I could not find any detailed information and so I do not know if I am doing any mistakes. I am worried that I might be serving up files I am not supposed. Do you have any pointers/URLs that gives more information on mod_proxy_ajp? Also as I promised here is the mod_jk.log after running it in debug mode ( please note that I am not looking for an answer but would still be looking to figure out what's happening with mod_jk) -- [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] uri_worker_map_dump::jk_uri_worker_map.c (176): generation 1: size=3D1 nosize=3D0 capacity=3D4 [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] uri_worker_map_dump::jk_uri_worker_map.c (186): NEXT (1) map #0: uri=3D/test/* worker=3DA context=3D/test/* source=3DJkMount type=3DWildchar len=3D11 [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_set_time_fmt::jk_util.c (458): Pre-processed log time stamp format is '[%a %b %d %H:%M:%S %Y] ' [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] init_jk::mod_jk.c (3123): Setting default connection pool max size to 1 [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_read_property::jk_map.c (491): Adding property 'workers.tomcat_home' with value '/usr/share/tomcat6' to map. [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_read_property::jk_map.c (491): Adding property 'workers.java.home' with value '/usr/lib/jvm/java' to map. [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_read_property::jk_map.c (491): Adding property 'worker.list' with value 'status, A' to map. [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_read_property::jk_map.c (491): Adding property 'worker.A.type' with value 'ajp13' to map. [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_read_property::jk_map.c (491): Adding property 'worker.A.host' with value 'localhost' to map. [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_read_property::jk_map.c (491): Adding property 'worker.A.port' with value '8009' to map. [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_read_property::jk_map.c (491): Adding property 'worker.A.lbfactor' with value '50' to map. [Tue Dec 01 14:13:01 2009] [1680:3083376384] [warn] jk_map_validate_property::jk_map.c (411): The attribute 'worker.A.cachesize' is deprecated - please check the documentation for the correct replacement. [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_read_property::jk_map.c (491): Adding property 'worker.A.cachesize' with value '10' to map. [Tue Dec 01 14:13:01 2009] [1680:3083376384] [warn] jk_map_validate_property::jk_map.c (411): The attribute 'worker.A.cache_timeout' is deprecated - please check the documentation for the correct replacement. [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_read_property::jk_map.c (491): Adding property 'worker.A.cache_timeout' with value '600' to map. [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_read_property::jk_map.c (491): Adding property 'worker.A.socket_keepalive' with value '1' to map. [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_read_property::jk_map.c (491): Adding property 'worker.A.socket_timeout' with value '300' to map. [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_read_property::jk_map.c (491): Adding property 'worker.status.type' with value 'status' to map. [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_resolve_references::jk_map.c (774): Checking for references with prefix worker. with wildcard (recursion 1) [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_shm_calculate_size::jk_shm.c (132): shared memory will contain 1 ajp workers of size 256 and 0 lb workers of size 320 with 0 members of size 320+256 [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] do_shm_open::jk_shm.c (493): Truncated shared memory to 384 [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] do_shm_open::jk_shm.c (538): Initialized shared memory /usr/local/apache2/logs/mod_jk.shm.1680 size=3D384 free=3D256 addr=3D0xb8060000 [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] do_shm_open_lock::jk_shm.c (412): Opened shared memory lock /usr/local/apache2/logs/mod_jk.shm.1680.lock [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_dump::jk_map.c (589): Dump of map: 'ServerRoot' -> '/usr/local/apache2' [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_dump::jk_map.c (589): Dump of map: 'workers.tomcat_home' -> '/usr/share/tomcat6' [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_dump::jk_map.c (589): Dump of map: 'workers.java.home' -> '/usr/lib/jvm/java' [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_dump::jk_map.c (589): Dump of map: 'worker.list' -> 'status, A' [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_dump::jk_map.c (589): Dump of map: 'worker.A.type' -> 'ajp13' [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_dump::jk_map.c (589): Dump of map: 'worker.A.host' -> 'localhost' [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_dump::jk_map.c (589): Dump of map: 'worker.A.port' -> '8009' [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_dump::jk_map.c (589): Dump of map: 'worker.A.lbfactor' -> '50' [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_dump::jk_map.c (589): Dump of map: 'worker.A.cachesize' -> '10' [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_dump::jk_map.c (589): Dump of map: 'worker.A.cache_timeout' -> '600' [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_dump::jk_map.c (589): Dump of map: 'worker.A.socket_keepalive' -> '1' [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_dump::jk_map.c (589): Dump of map: 'worker.A.socket_timeout' -> '300' [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] jk_map_dump::jk_map.c (589): Dump of map: 'worker.status.type' -> 'status' [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] build_worker_map::jk_worker.c (242): creating worker status [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] wc_create_worker::jk_worker.c (146): about to create instance status of status [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] wc_create_worker::jk_worker.c (159): about to validate and init status [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] init::jk_status.c (5021): Status worker 'status' is read/write and has css '(null)', prefix 'worker', name space 'jk:', xml name space 'xmlns:jk=3D"http://tomcat.apache.org"', document type '(null)' [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] init::jk_status.c (5072): Status worker 'status' has good rating for '0000000f' and bad rating for '00ff1010' [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] build_worker_map::jk_worker.c (242): creating worker A [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] wc_create_worker::jk_worker.c (146): about to create instance A of ajp13 [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] wc_create_worker::jk_worker.c (159): about to validate and init A [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] ajp_validate::jk_ajp_common.c (2512): worker A contact is 'localhost:8009' [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] ajp_init::jk_ajp_common.c (2699): setting endpoint options: [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] ajp_init::jk_ajp_common.c (2702): keepalive: 1 [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] ajp_init::jk_ajp_common.c (2706): socket timeout: 300 [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] ajp_init::jk_ajp_common.c (2710): socket connect timeout: 300000 [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] ajp_init::jk_ajp_common.c (2714): buffer size: 0 [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] ajp_init::jk_ajp_common.c (2718): pool timeout: 600 [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] ajp_init::jk_ajp_common.c (2722): ping timeout: 10000 [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] ajp_init::jk_ajp_common.c (2726): connect timeout: 0 [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] ajp_init::jk_ajp_common.c (2730): reply timeout: 0 [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] ajp_init::jk_ajp_common.c (2734): prepost timeout: 0 [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] ajp_init::jk_ajp_common.c (2738): recovery options: 0 [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] ajp_init::jk_ajp_common.c (2742): retries: 2 [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] ajp_init::jk_ajp_common.c (2746): max packet size: 8192 [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] ajp_init::jk_ajp_common.c (2750): retry interval: 100 [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] ajp_create_endpoint_cache::jk_ajp_common.c (2562): setting connection pool size to 10 with min 5 and acquire timeout 200 [Tue Dec 01 14:13:01 2009] [1680:3083376384] [info] init_jk::mod_jk.c (3183): mod_jk/1.2.28 initialized [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] wc_get_worker_for_name::jk_worker.c (116): found a worker A [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] wc_get_name_for_type::jk_worker.c (293): Found worker type 'ajp13' [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] uri_worker_map_ext::jk_uri_worker_map.c (512): Checking extension for worker 0: A of type ajp13 (2) [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] uri_worker_map_dump::jk_uri_worker_map.c (171): uri map dump after extension stripping: index=3D0 file=3D'(null)' reject_unsafe=3D0 reload=3D6= 0 modified=3D0 checked=3D0 [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] uri_worker_map_dump::jk_uri_worker_map.c (176): generation 0: size=3D0 nosize=3D0 capacity=3D0 [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] uri_worker_map_dump::jk_uri_worker_map.c (176): generation 1: size=3D1 nosize=3D0 capacity=3D4 [Tue Dec 01 14:13:01 2009] [1680:3083376384] [debug] uri_worker_map_dump::jk_uri_worker_map.c (186): NEXT (1) map #0: uri=3D/test/* worker=3DA context=3D/test/* source=3DJkMount type=3DWildchar len=3D11 [Tue Dec 01 14:13:01 2009] [7270:3083376384] [debug] jk_child_init::mod_jk.c (3068): Initialized mod_jk/1.2.28 [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map URI '/test/index.jsp' from 1 maps [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] find_match::jk_uri_worker_map.c (850): Attempting to map context URI '/test/*=3DA' source 'JkMount' [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] find_match::jk_uri_worker_map.c (863): Found a wildchar match '/test/*=3DA' [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] jk_handler::mod_jk.c (2459): Into handler jakarta-servlet worker=3DA r->proxyreq=3D0 [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] wc_get_worker_for_name::jk_worker.c (116): found a worker A [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] wc_maintain::jk_worker.c (339): Maintaining worker A [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] ajp_maintain::jk_ajp_common.c (3081): reached pool min size 5 from 10 cache slots [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] wc_get_name_for_type::jk_worker.c (293): Found worker type 'ajp13' [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] init_ws_service::mod_jk.c (977): Service protocol=3DHTTP/1.1 method=3DGET ssl=3Dfalse host=3D(null) addr=3DX.X.X.X name=3Dwww.example.com port=3D80 auth=3D(null) user=3D(null) laddr=3D192.168.2.2 raddr=3DX.X.X.X uri=3D/test/index.jsp [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] ajp_get_endpoint::jk_ajp_common.c (2977): acquired connection pool slot=3D0 after 0 retries [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] ajp_marshal_into_msgb::jk_ajp_common.c (605): ajp marshaling done [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] ajp_service::jk_ajp_common.c (2283): processing A with 2 retries [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] ajp_send_request::jk_ajp_common.c (1501): (A) all endpoints are disconnected. [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] jk_open_socket::jk_connect.c (452): socket TCP_NODELAY set to On [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] jk_open_socket::jk_connect.c (489): socket SO_KEEPALIVE set to On [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] jk_open_socket::jk_connect.c (541): timeout 300 set for socket=3D17 [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] jk_open_socket::jk_connect.c (576): trying to connect socket 17 to 127.0.0.1:8009 [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] jk_open_socket::jk_connect.c (602): socket 17 connected to 127.0.0.1:8009 [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] ajp_connect_to_endpoint::jk_ajp_common.c (931): Connected socket 17 to (127.0.0.1:8009) [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] ajp_connection_tcp_send_message::jk_ajp_common.c (1070): sending to ajp13 pos=3D4 len=3D450 max=3D8192 [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] ajp_send_request::jk_ajp_common.c (1560): (A) request body to send 0 - request body to resend 0 [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] ajp_connection_tcp_get_message::jk_ajp_common.c (1259): received from ajp13 pos=3D0 len=3D19 max=3D8192 [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] ajp_connection_tcp_get_message::jk_ajp_common.c (1259): 0000 04 01 90 00 0B 42 61 64 20 52 65 71 75 65 73 74 - .....Bad.Request [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] ajp_connection_tcp_get_message::jk_ajp_common.c (1259): 0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ................ [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] ajp_unmarshal_response::jk_ajp_common.c (660): status =3D 400 [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] ajp_unmarshal_response::jk_ajp_common.c (667): Number of headers is =3D 0 [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] ajp_connection_tcp_get_message::jk_ajp_common.c (1259): received from ajp13 pos=3D0 len=3D2 max=3D8192 [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] ajp_connection_tcp_get_message::jk_ajp_common.c (1259): 0000 05 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ................ [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] ajp_process_callback::jk_ajp_common.c (1846): AJP13 protocol: Reuse is OK [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] ajp_reset_endpoint::jk_ajp_common.c (743): (A) resetting endpoint with sd =3D 17 [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] ajp_done::jk_ajp_common.c (2905): recycling connection pool slot=3D0 for worker A [Tue Dec 01 14:13:02 2009] [7267:3083376384] [debug] jk_handler::mod_jk.c (2599): Service finished with status=3D400 for worker=3DA On Wed, Dec 2, 2009 at 2:13 PM, Andr=E9 Warnier wrote: > groupalias v wrote: >> >> In response to Chris' question - =A0 I have only one tomcat instance >> running and it picks up the webapps in /srv/tomcat6/webapps/ >> and the URL www.example.com:8080/test/index.jsp works fine. =A0I tried >> with the mod_jk.c and jk_module with the same result. >> >> In response to Andr=E9's question this is the first time I am hearing >> about the SetHandler construct. =A0Is there documentation somewhere I >> can read? > > Look at the bottom of this page. > http://tomcat.apache.org/connectors-doc/reference/apache.html > > (Off-topic note : this page seems quite hard to find, starting from the t= op > documentation page for Tomcat 6.0 at > http://tomcat.apache.org/tomcat-6.0-doc/index.html > Is this a mistake or intentional ?) > > >> The issue about security is something I am concerned too and thought >> its too error prone. >> >> What is the workers.tomcat_home directive in workers.properties used for= ? >> > Chris answered that. Remove it. =A0There are a couple more like that, if = you > copied an older workers.properties into a newer Tomcat config. > >> If the communication is over the 8009 port why does apache care about >> one of tomcat's directories? >> > I will be a bit more nuanced (and considerably longer) than Chris here. > > The Connector port has nothing to do with it. > Basically, Apache does not know anything about Tomcat at all, ever. > The only thing Apache knows, is that for each request URL, there is a > "response generator" (also called a handler). > > Apache itself normally generates a response using its own default handler= . > =A0That handler resolves the URL location, generally, to a file on disk, = and > returns the content of that file as the response to the request. (I am > simplifying a bit, but it is the general idea). > > Except, if something in the configuration tells it that for some specific > URL, there is another handler to use for generating the response. > JkMount is such a configuration directive. > It tells Apache that for some URLs, it should use another response genera= tor > called mod_jk. > (The same is achieved by the "SetHandler jakarta-servlet" directive.) > > So for such URLs, Apache does not generate the response itself, but passe= s > the request to mod_jk, and expects mod_jk to produce the response. When t= he > response comes from mod_jk, Apache merely copies it back to the browser. > Apache has no idea that mod_jk, to produce the response, is using one or > more Tomcats in the background. =A0Apache also does not know that mod_jk > communicates with Tomcat via port 8009 (or any other port). > If instead of talking to a Tomcat via port 8009, mod_jk was talking to yo= u > by telephone, and you were writing the response, Apache would not see the > difference. > > But what Apache knows about, is any filesystem location you tell it to lo= ok > into, to find files to return as response for some URLs. > By using the directive > Alias /test/ /srv/tomcat6/webapps/A > you are telling Apache "hey, if the request URL is /test/abc.html, then g= o > look for a file /srv/tomcat6/webapps/A/abc.html". > Apache has no idea that this directory is also part of the "Tomcat space"= , > and it could not care less. =A0If it looks there, and finds a file "abc.h= tml", > it will just copy its content to the browser, without ever asking mod_jk = or > Tomcat anything. =A0In other words, it completely ignores mod_jk and Tomc= at, > and serves the file directly from the filesystem. > > That is why this Alias is dangerous. > That is also why it is extremely dangerous to do as quite a few people se= em > to do, to set the Apache DocumentRoot to the "webapps" directory of Tomca= t, > thinking "hey, I'll serve the static content directly with Apache". (That > may be an appropriate thing to do sometimes, but not in this way). > > According to Chris, the later JkMount's in your config will take preceden= ce > over that Alias, and thus "override" (or "cancel") it. =A0But it is not q= uite > clear yet that they always do, and there is no documentation that I know = of, > that confirms this. > Let me give you a partial counter-example : > > If you had > Alias /test/ /srv/tomcat6/webapps/A > > and then you also had > JkMount /test/*.jsp A > > then indeed, for any request URL starting with "/test/" and ending in > ".jsp", the JkMount would take precedence over the Alias, and that reques= t > will be served by mod_jk (and thus really by Tomcat). > But for a request URL like "/test/secret-data.conf" the above JkMount wou= ld > not take precedence over the Alias, and Apache would serve that file > directly from disk. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org