RE: JK2 URI not correctly mapped for multiple virtual hosts in httpd.conf
Hi Mladen, it's a pain having to express concepts in a language that is not mine. Perhaps that's the reason why you don't understand me. (and i hope nothing i say can sound offensive to anyone, it's not my intention. Believe me i'm trying to cooperate, not to put shame on anybody) Please try to read further than the first line. Tomcat is not supposed to resolve anything. There is Apache in front of it that has to perform that task. The problem is that when configuring jk2 with httpd.conf the way it's shown in the doc i sent, NOT A SINGLE PACKET IS EVER ROUTED TO THE TOMCAT INSTANCES THAT ARE MAPPED FIRST IN HTTPD.CONF, ONLY THE LAST ONE RECEIVES PACKETS. Pls, do not believe me, try to setup a similar conf and run an ip trace. I have right now, more or less ten tomcat instances, all of them happily working with default server.xml and host name=localhost, and different virtual host names within apache httpd.conf, with mod_jk. The only things i changed were port numbers. If what you say is true, then why ivdev01 tomcat instance works? And why simply exchanging place of the virtual host definitions, within httpd.conf, ivdev01 STOPS working and iv00 STARTS working? And why if i map uri's into workers2.properties all the instances works? And all of this without changing a bit of tomcat server.xml? Pls, have a look into jkstatus.noworkers2.htm output. When using the order shown into httpd.conf.noworkers2 file, there is the mapping for ivdev01/*.jsp ivdev01/servlet BUT NO MAPPING FOR iv00/*.jsp iv00/servlets because iv00 virtual host cames FIRST in READ ORDER than ivdev01 host. If i reverse the order of virtual host definitons, ie ivdev01 FIRST then iv00, the reverse happens. I will have mapping for iv00/*.jsp iv00/servlets BUT NO MAPPING FOR ivdev01/*.jsp ivdev01/servlet because now ivdev01 host cames FIRST in READ ORDER than iv00 host. This problem only happens when i try to map the SAME URI PATHS do DIFFERENT virtual hosts within the SAME httpd.conf. If i map DIFFERENT URI PATHS to DIFFERENT virtual hosts all works. Regards, Gabriele. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: JK2 URI not correctly mapped for multiple virtual hosts in httpd.conf
Sorry, i just realized that html files are cut out from mail, so i include here the complete set of files as a zip file. (See attached file: jk2uri-problem.zip) Regards, Gabriele. jk2uri-problem.zip Description: Zip archive -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: JK2 URI not correctly mapped for multiple virtual hosts in httpd.conf
One question. Do you have Host name=iv00 ... In the server.xml? Also, Why are you setting all those load balancers and groups? Try using pragmatic approach. Use the httpd.conf.noworkers2 and comment all the JkUriSet group Use the single connection without any lb and groups. The following three files instead shows the situation when the uri's are mapped with JkSet and JkUriSet within httpd.conf. (See attached file: httpd.conf.noworkers2)(See attached file: jkstatus.noworkers2.htm)(See attached file: workers2.properties.min.nouri) As you can see in jkstatus output, there's no mention of the uri for host iv00 ant there's no way to have the relative worker to be called. There is (look at the uri runtime info). I home this is enough for you to undestand the problem. Best regards, Gabriele. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: JK2 URI not correctly mapped for multiple virtual hosts in httpd.conf
Hi Mladen, I'll try to answer yor questions. 1- server.xml is the default one with host name=localhost 2- the environmement i'm trying to replicate already works with mod_jk (you may ask, so why don't you stick there? Well at least in the development env i like to be on the bleeding edge of technology). I have a group of developers, each of which has its own tomcat instance, a couple of beta test environments and some production environments. That's the reason to all those groups and load balancers, development and testing and configuration experiments. I tried to clean up the config i sent but something slipped in, in any case this does not change the problem. My sillogism is: if a config is valid and it's working with mod_jk, then it has to work, somehow, also with mod_jk2. 3- No there isn't. When the uri's are mapped into httpd.conf and not into workers2.properties, like the conf files i sent, there is NO way to call iv00/*.jsp, beacuse this uri is not mapped anywhere. If, in httpd.conf, i map as shown virtualhost iv00 then ivdev01, ivdev01/*.jsp works, iv00/*.jsp DOES NOT WORK (404 Not Found). If i reverse, in httpd.conf, the order of virtual hosts, ie ivdev01 THEN iv00, iv00/*.jsp works and ivdev01/*.jsp DOES NOT WORK (404 Not Found). In the end when mapping same uri path to different virtual hosts ONLY THE LAST ONE IN READ ORDER WILL GET CORRECT MAPPING and will be delivered to the correct tomcat instance. If you say me that jk2 is not meant for this kind of configurations, i'll forget everything (with regret because i've got the impression that it's a bit faster and stabler than jk), and stick with jk. But IMHO this is not a correct behaviour and for what in my possibilities i wish to cooperate to solve this. Best regards, Gabriele. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: JK2 URI not correctly mapped for multiple virtual hosts in httpd.conf
-Original Message- From: [EMAIL PROTECTED] Hi Mladen, I'll try to answer yor questions. 1- server.xml is the default one with host name=localhost Then, how do you suppose that Tomcat will resolve the Virtiual Host requests for iv00 when you have only the localhost? MT. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: JK2 URI not correctly mapped for multiple virtual hosts in httpd.conf
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, October 11, 2002 1:48 PM To: [EMAIL PROTECTED] Subject: JK2 URI not correctly mapped for multiple virtual hosts in httpd.conf Suppose you have a configuration like this: VirtualHost 1.1.1.1 ServerName srva ServerAliasa.srva ServerAliasb.srva . [ some apache specific conf omitted] JkSet uri:srva.alias a.srva JkSet uri:srva.alias b.srva . FilesMatch /*.jsp JkUriSet uri srva JkUriSet group wrka /FilesMatch Location /servlet JkUriSet uri srva JkUriSet group wrka /Location /VirtualHost Same for other vhosts. MT. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
JK2 URI not correctly mapped for multiple virtual hosts in httpd.conf
Suppose you have a configuration like this: VirtualHost 1.1.1.1 ServerName srva ServerAliasa.srva ServerAliasb.srva . [ some apache specific conf omitted] . FilesMatch /*.jsp JkUriSet group wrka /FilesMatch Location /servlet JkUriSet group wrka /Location /VirtualHost VirtualHost 1.1.1.1 ServerName srvb ServerAliasa.srvb ServerAliasb.srvb . [ some apache specific conf omitted] . FilesMatch /*.jsp JkUriSet group wrkb /FilesMatch Location /servlet JkUriSet group wrkb /Location /VirtualHost Mod jk2 will save the uri's only by the names written in FilesMatch and Location without the virtual server name and alias, so after reading the configuration the only save uri set is the last one that was read, as seen from jkstatus runtime uri info: id name host uri group 0/*.jspsrvb /*.jspwrkb 0/servlet srvb /servlet wrkb No mention of srva and all the requests for /*jsp and /servlet, wether sent to srva or srvb will be redirected to wrkb. There is no way ( at least no one i could figure out) to map the requests with the correct worker unless you omit completely any jk2 config from http.conf and map all the uri into workers2.properties. But this is not feasible when you have many virtual hosts with many aliases and many FilesMatch and Location, because of the explosive count of the various combinations [(Number of VirtualHosts) * (number of names for each VirtualHost) * (number of filesystems and webspace containers)] and the fact that the discrimination of the requests is delegated to mod_jk2 instead of the more efficient apache. Is this still work in progress or is a bug? Thanks, Gabriele -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]