RE: [JK2] new uriMap using hostname:port
-Original Message- From: Dmitry Letin [mailto:[EMAIL PROTECTED]] :-) [uri:*] alias=localhost debug=10 [uri:www.i-com.com:80] debug=10 If the 80 is default server port then you have to ommit it Simply use the [uri:www.i-com.com] The port directive is used for non default ports only. MT. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [JK2] new uriMap using hostname:port
Hola Mladen, there are already some problems with port based VS hosting, in httpd.conf you have: ( i use apache2 for testing IIS vhost support, blame on w2kp :(, dont point me the JkUriSet method for config vhosts in apache, please :) Listen 8081 NameVirtualHost *:8081 VirtualHost *:8081 ServerAdmin [EMAIL PROTECTED] DocumentRoot E:/Apache2/htdocs/www.ciberlogic.com_8081 ServerName www.hippo.com:8081 ErrorLog logs/www.ciberlogic.com_8081-error_log CustomLog logs/www.ciberlogic.com_8081-access_log common /VirtualHost and a wk2.p file with only [uri:www.hippo.com:8081/examples/*] will not work, to solve it we need to revert the correctHosts function deleted lately ( to create vhost from declared uris ), and use it in uriMap_init, in addition the uriEnv-virtual containst the port if non standard, initializations fails to setup the uri above,it goes to the default host, because the uriEnv-virtual can not be found in the vhosts map, as this map uses the host without port as key.. I have a patch for this from yesterdays source's, i need to integrate your latest changes, but i couldnt do it until night here.. so.. Saludos , Ignacio J. Ortega -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [JK2] new uriMap using hostname:port
I do not know what is wrong, but I just updated the jk subdirectory from the CVS, built mod_jk2.so by running make in jk/native2, installed it to apache2/conf and tried different combinations of workers2.properties: START OF workers2.properties [logger] level=DEBUG [shm] file=/usr/local/apache2/logs/jk2.shm size=1048576 [uriMap:] debug=10 [status:status] debug=10 ## TRY1 #[uri:*] #alias=localhost #[uri:/jkstatus/*] #worker=status:status ## TRY2 #[uri:localhost] #debug=10 #[uri:localhost/jkstatus/*] #worker=status:status ## TRY3 #[uri:localhost:80] #debug=10 #[uri:localhost:80/jkstatus/*] #worker=status:status ## TRY4 [uri:www.i-com.com:8019] debug=10 [uri:www.i-com.com:8019/jkstatus/*] worker=status:status END OF workers2.properties All of them failed with the following message in error log [Tue Sep 24 10:13:07 2002] [notice] uriMap.mapUri() cannot find host localhost/ or for TRY4: [Tue Sep 24 10:18:36 2002] [notice] uriMap.mapUri() cannot find host www.i-com.com/ And I do not see messages like this in error log: [Sat Sep 21 18:09:40 2002] (debug ) [jk_uriMap.c (371)] uriMap.init() loaded host www.i-com.com I saw those messages when mappings worked. What can be wrong? Thanks, Dmitry Mladen Turk wrote: -Original Message- From: Dmitry Letin [mailto:[EMAIL PROTECTED]] :-) [uri:*] alias=localhost debug=10 [uri:www.i-com.com:80] debug=10 If the 80 is default server port then you have to ommit it Simply use the [uri:www.i-com.com] The port directive is used for non default ports only. MT. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [JK2] new uriMap using hostname:port
-Original Message- From: Ignacio J. Ortega [mailto:[EMAIL PROTECTED]] ServerName www.hippo.com:8081 This is the problem (I forgot that the server name can have a port) and a wk2.p file with only [uri:www.hippo.com:8081/examples/*] will not work, to solve it we need to revert the correctHosts function deleted lately ( to create vhost from declared uris ), and use it in uriMap_init, in addition the uriEnv-virtual containst the port if non standard, initializations fails to setup the uri above,it goes to the default host, because the uriEnv-virtual can not be found in the vhosts map, as this map uses the host without port as key.. No, no need to call the correctHosts. uriMap has to check (simple strchr(uri, ':')) if the port is supplied in the server name I have a patch for this from yesterdays source's, i need to integrate your latest changes, but i couldnt do it until night here.. so.. MT. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [JK2] new uriMap using hostname:port
De: Mladen Turk [mailto:[EMAIL PROTECTED]] Enviado el: 24 de septiembre de 2002 16:31 From: Ignacio J. Ortega [mailto:[EMAIL PROTECTED]] and a wk2.p file with only [uri:www.hippo.com:8081/examples/*] will not work, to solve it we need to revert the correctHosts function deleted lately ( to create vhost from declared uris ), and use it in uriMap_init, in addition the uriEnv-virtual containst the port if non standard, initializations fails to setup the uri above,it goes to the default host, because the uriEnv-virtual can not be found in the vhosts map, as this map uses the host without port as key.. No, no need to call the correctHosts. uriMap has to check (simple strchr(uri, ':')) if the port is supplied in the server name I'm really curious about how the vhosts got created automagically, the only way i've found if resurrecting correctHosts.. but who knows.. :)) To be clear, the only line in my wk2.p file that names the vs is the uri one.., so i really dont understand how the code will create the vhost, without rereading the uriEnv.. as said i'll wait and see, or in the case please explain me how this is done now, i'm losing the clue.. Saludos , Ignacio J. Ortega -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [JK2] new uriMap using hostname:port
From Dmitry Letin And I do not see messages like this in error log: [Sat Sep 21 18:09:40 2002] (debug ) [jk_uriMap.c (371)] uriMap.init() loaded host www.i-com.com Try setting LogLevel to debug in the httpd.conf Post the ServerName, Listen and VirtualHost from your httpd.conf And the worker2.properties But, Listen 8019 NameVirtualHost *:8019 VirtualHost *:8019 ServerName www.i-com.com:8019 /VirtualHost [uri:www.i-com.com:8019] [uri:www.i-com.com:8019/examples/*] context=/examples Should work. MT. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [JK2] new uriMap using hostname:port
[uri:www.hippo.com:8081/examples/*] And where is your context :) This is app. [uri:www.hippo.com:8081/examples/*] context=/examples It works (just checked the same config) Do you have Host in the server.xml? Touche!! :)) I dont think i ever tested contexts so may be you are right :)), but in any case i dont like to need this obviously redundant config setting in this simple setup, i'll wait until night here to see how this works, But i suspect that you are doing unadvertly Global mappings, in a wk1.p file with only this couple of lines, is the examples context accesible from _default_ ? , if yes, the problems i were fighting still exist in the VS handling code in jk2.. Saludos , Ignacio J. Ortega -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [JK2] new uriMap using hostname:port
De: Mladen Turk [mailto:[EMAIL PROTECTED]] Enviado el: 24 de septiembre de 2002 17:03 [uri:www.i-com.com:8019] [uri:www.i-com.com:8019/examples/*] context=/examples Should work. This is exactly what correctHost did :)), to obviate the need to declare hosts in wk2.p file :)), so this is the problem we are having, mistery resolved.. ;) But now i know i'm totally -1 about to delete correctHosts.. The config file should be minimal in the minimal case, less settings needed = less problems for users = less messages in tomcat-user :)).., if one need a complicated setup well, no problem, can be done, but the simplest case ( map a concrete java context to a concrete vs ) should require a one line config file.. Saludos , Ignacio J. Ortega -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [JK2] new uriMap using hostname:port
I have IP-based virtual host, not name-based ### ### http.conf ### ... Listen www.i-com.com:8019 LogLevel debug ... VirtualHost www.i-com.com:8019 ServerName www.i-com.com:8019 ... /VirtualHost ### ### workers2.properties ### [logger] level=DEBUG [shm] file=/usr/local/apache2/logs/jk2.shm size=1048576 [channel.socket:localhost:8013] port=8013 host=127.0.0.1 debug=10 [ajp13:localhost:8013] channel=channel.socket:localhost:8013 debug=10 [uriMap:] debug=10 [status:status] debug=10 [uri:www.i-com.com:8019] debug=10 [uri:www.i-com.com:8019/jkstatus/*] worker=status:status [uri:www.i-com.com:8019/*.jsp] worker=ajp13:localhost:8013 END OF workers2.properties Neither url works: http://www.i-com.com:8019/jkstatus http://www.i-com.com:8019/dhtml/10.jsp Messages in log: [Tue Sep 24 11:29:09 2002] [debug] ../../common/jk_uriMap.c(500): uriMap.mapUri() hostname www.i-com.com port 8019 uri /jkstatus [Tue Sep 24 11:29:09 2002] [notice] uriMap.mapUri() cannot find host www.i-com.com/ [Tue Sep 24 11:28:59 2002] [notice] mod_jk child init 1 -1 [Tue Sep 24 11:29:02 2002] [debug] ../../common/jk_uriMap.c(500): uriMap.mapUri() hostname www.i-com.com port 8019 uri /dhtml/10.jsp [Tue Sep 24 11:29:02 2002] [notice] uriMap.mapUri() cannot find host www.i-com.com/ What is that trailing slash in the cannot find host www.i-com.com/ ? Dmitry Mladen Turk wrote: From Dmitry Letin And I do not see messages like this in error log: [Sat Sep 21 18:09:40 2002] (debug ) [jk_uriMap.c (371)] uriMap.init() loaded host www.i-com.com Try setting LogLevel to debug in the httpd.conf Post the ServerName, Listen and VirtualHost from your httpd.conf And the worker2.properties But, Listen 8019 NameVirtualHost *:8019 VirtualHost *:8019 ServerName www.i-com.com:8019 /VirtualHost [uri:www.i-com.com:8019] [uri:www.i-com.com:8019/examples/*] context=/examples Should work. MT. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [JK2] new uriMap using hostname:port
-Original Message- From: Ignacio J. Ortega [mailto:[EMAIL PROTECTED]] This is exactly what correctHost did :)), to obviate the need to declare hosts in wk2.p file :)), so this is the problem we are having, mistery resolved.. ;) But now i know i'm totally -1 about to delete correctHosts.. The config file should be minimal in the minimal case, less settings needed = less problems for users = less messages in tomcat-user :)).., if one need a complicated setup well, no problem, can be done, but the simplest case ( map a concrete java context to a concrete vs ) should require a one line config file.. I agree that it need to much typing, I'm allready working on something like that (correctHosts :-)) MT. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [JK2] new uriMap using hostname:port
All that matter to me is to preserve the equivalence with 'native' apache config. In other words, [uri:HOST:PORT/URL] properties Must be equivalent with VirtualHost addr:port ... ServerAlias ... Location /URL JkUriSet /Location /VirtualHost By this criteria, I would prefer use of '_default_' for the default server. For the syntax of HOST, port, URL - just make sure it matches the documented semantics of apache VirtualHost and Location. Costin Mladen Turk wrote: Think I didn't miss something :) Here is how it works: All the mappings are done in the following way: hostname|*[:port] Meaning '*' is used for the default host. You can make now something like: [uri:*:8080] Info=will map the all the default servers on the port 8080 Aliases should work now: [uri:*] alias=localhost alias=www.apache.org I have dropped the reverse attribute for now. Its too clumsy, and it will be enabled if pcre is ever adopted. IIS (work to some extend) and Apache 1.3 need some extra tuning :-) Please do test. MT. -- Costin -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [JK2] new uriMap using hostname:port
Yikes! today's version no longer compiles without APR on 1.3: [so] Output: [so] rm -f /home/eugene/tomcat/jakarta-tomcat-connectors/jk/build/jk2/apache13/common/.libs/jk_uriEnv.lo [so] cc -c -I/home/eugene/tomcat/jakarta-tomcat-connectors/jk/native2/include -I/home/eugene/tomcat/jakarta-tomcat-connectors/jk/native2/common -I\${build.compiler.base}/include -I/usr/include -I/usr/include/apache -I/home/eugene/tomcat/jakarta-tomcat-connectors/jk/native2/include -I/usr/java/j2sdk1.4.1/jre/../include -I/usr/java/j2sdk1.4.1/jre/../include/linux -g -W -DEAPI -D_REENTRANT -DCHUNK_SIZE=4096 -DHAVE_MMAP /home/eugene/tomcat/jakarta-tomcat-connectors/jk/native2/common/jk_uriEnv.c -fPIC -DPIC -o /home/eugene/tomcat/jakarta-tomcat-connectors/jk/build/jk2/apache13/common/.libs/jk_uriEnv.lo [so] StdErr: [so] /home/eugene/tomcat/jakarta-tomcat-connectors/jk/native2/common/jk_uriEnv.c:72:21: apr_uri.h: No such file or directory Costin Manolache wrote: All that matter to me is to preserve the equivalence with 'native' apache config. In other words, [uri:HOST:PORT/URL] properties Must be equivalent with VirtualHost addr:port ... ServerAlias ... Location /URL JkUriSet /Location /VirtualHost By this criteria, I would prefer use of '_default_' for the default server. For the syntax of HOST, port, URL - just make sure it matches the documented semantics of apache VirtualHost and Location. Costin Mladen Turk wrote: Think I didn't miss something :) Here is how it works: All the mappings are done in the following way: hostname|*[:port] Meaning '*' is used for the default host. You can make now something like: [uri:*:8080] Info=will map the all the default servers on the port 8080 Aliases should work now: [uri:*] alias=localhost alias=www.apache.org I have dropped the reverse attribute for now. Its too clumsy, and it will be enabled if pcre is ever adopted. IIS (work to some extend) and Apache 1.3 need some extra tuning :-) Please do test. MT. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: [JK2] new uriMap using hostname:port
Does not work for me for some reason. I have updated to latest version of CVS and recompiled mod_jk2.so for apache2. I looks that it does not load hosts at all. Before I had this in my jk2 log file: [Sat Sep 21 18:09:40 2002] (debug ) [jk_uriMap.c (371)] uriMap.init() loaded host www.i-com.com Now I do not have it In my workers2.properties among other stuff I have: [uri:*] alias=localhost debug=10 [uri:www.i-com.com:80] debug=10 [status:status] debug=10 [uri:*/jkstatus/*] worker=status:status debug=10 [uri:www.i-com.com:80/*.jsp] worker=ajp13:localhost:8013 debug=10 Neither of the mappings work, even jkstatus Did you have i chance to look at the simple patch that I used: http://www.mail-archive.com/tomcat-user%40jakarta.apache.org/msg66936.html List: tomcat-dev Subject: [JK2] new uriMap using hostname:port From: Mladen Turk [EMAIL PROTECTED] Date: 2002-09-23 17:53:50 [Download message RAW] Think I didn't miss something :) Here is how it works: All the mappings are done in the following way: hostname|*[:port] Meaning '*' is used for the default host. You can make now something like: [uri:*:8080] Info=will map the all the default servers on the port 8080 Aliases should work now: [uri:*] alias=localhost alias=www.apache.org I have dropped the reverse attribute for now. Its too clumsy, and it will be enabled if pcre is ever adopted. IIS (work to some extend) and Apache 1.3 need some extra tuning :-) Please do test. MT. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]