JK2, JkUriSet and virtual hosting

2003-01-13 Thread Q. Werty
Hi,

I'am facing a problem with JK2 and virtual hosting.
Configuration : Tomcat 4.1.18/Apache 2.0.43/JK2 2.0.2/Windows 
2000 SP3.

As said in previous messages and in some documentation, it's 
possible to configure URI mapping with JK2 in Apache 
httpd.conf file (as with mod_jk). There exist JkUriSet to do 
this.
This directive work well, except when use with virtual host 
and same context. It seems that JkUriSet directive doesn't  
include hostname in internal configuration.
Does anyone has encountered same problem or does anyone knows 
how to resolve it?

Thanks in advance for any response.

 Following a longer explanation of the problem ===

Let's say I've got a /samples context in www.srv1.com and 
www.srv2.com host (correctly defined in Tomcat and Apache).
I defined two workers for JK2 (local_1 and local_2). I put the 
following directive in httpd.conf : 

VirtualHost *
ServerName www.srv1.com
#... others directives for this host

Location /samples
JkUriSet worker ajp13:local_1
/Location
/VirtualHost


VirtualHost *
ServerName www.srv2.com
#... others directives for this host

Location /samples
JkUriSet worker ajp13:local_2
/Location
/VirtualHost

= Results : all /samples URL are forwared to local_2, even 
requests to www.srv1.com.

Some remarks :
1. this configuration, all in workers2.properties with 
[uri:...] and without JkUriSet work very well.
2. when requesting /JkStatus, it appear that only the JkUriSet 
directive by context is used, and WITHOUT hostname


Accédez au courrier électronique de La Poste : www.laposte.net ; 
3615 LAPOSTENET (0,13 €/mn) ; tél : 08 92 68 13 50 (0,34€/mn)




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: JK2, JkUriSet and virtual hosting

2003-01-13 Thread Mladen Turk

Try something like:

VirtualHost *
 ServerName www.srv1.com
 #... others directives for this host
 
 Location /samples
 JkUriSet uri www.srv1.com
 JkUriSet worker ajp13:local_1
 /Location
  /VirtualHost
Or...
 Location /samples
 JkUriSet uri www.srv1.com
 JkUriSet worker ajp13:www.srv1.com:8009
 /Location

Should work :)

MT.

 -Original Message-
 From: Q. Werty [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, January 13, 2003 4:49 PM
 To: tomcat-user
 Subject: JK2, JkUriSet and virtual hosting
 
 
 Hi,
 
 I'am facing a problem with JK2 and virtual hosting. 
 Configuration : Tomcat 4.1.18/Apache 2.0.43/JK2 2.0.2/Windows 
 2000 SP3.
 
 As said in previous messages and in some documentation, it's 
 possible to configure URI mapping with JK2 in Apache 
 httpd.conf file (as with mod_jk). There exist JkUriSet to do 
 this.
 This directive work well, except when use with virtual host 
 and same context. It seems that JkUriSet directive doesn't  
 include hostname in internal configuration.
 Does anyone has encountered same problem or does anyone knows 
 how to resolve it?
 
 Thanks in advance for any response.
 
  Following a longer explanation of the problem ===
 
 Let's say I've got a /samples context in www.srv1.com and 
 www.srv2.com host (correctly defined in Tomcat and Apache).
 I defined two workers for JK2 (local_1 and local_2). I put the 
 following directive in httpd.conf : 
 
 VirtualHost *
 ServerName www.srv1.com
 #... others directives for this host
 
 Location /samples
 JkUriSet worker ajp13:local_1
 /Location
 /VirtualHost
 
 
 VirtualHost *
 ServerName www.srv2.com
 #... others directives for this host
 
 Location /samples
 JkUriSet worker ajp13:local_2
 /Location
 /VirtualHost
 
 = Results : all /samples URL are forwared to local_2, even 
 requests to www.srv1.com.
 
 Some remarks :
 1. this configuration, all in workers2.properties with 
 [uri:...] and without JkUriSet work very well.
 2. when requesting /JkStatus, it appear that only the JkUriSet 
 directive by context is used, and WITHOUT hostname
 
 
 Accédez au courrier électronique de La Poste : www.laposte.net ; 
 3615 LAPOSTENET (0,13 €/mn) ; tél : 08 92 68 13 50 (0,34€/mn)
 
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For 
 additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 
 
 


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]