You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tom <ne...@tekennelly.gotdns.com> on 2006/09/06 16:45:52 UTC

Re: mod_jk garbled - how to change JK* directives for ProxyPass?

Now, after implementing mod_proxy_ajp, I do not have a clue how to 
change all of the JK* settings to use the new mod_proxy_ajp approach. 
Previously I used  JKmount /*.jsp worker1

I am not sure how to use a <Location> for a <LocationMatch>.  I did 
experiment with <LocationMatch ".jsp"> but that did not seem to work.

Mladen Turk wrote:
> David Smith wrote:
>> And the Apache httpd module API is as far as I understand a moving 
>> target.  Modules for 2.0.x are not compatible with 2.2.  Try one 
>> built for 2.2, or if available,
>
> It is not available, neither it will be.
> The preferred solution is to use the mod_proxy with
> mod_proxy_ajp and mod_proxy_balancer.
>
>> use the mod_rewrite for 2.2.  It's supposed to be able to handle the 
>> AJP/1.3 protocol.
>>
>
> Use mod_proxy and mod_proxy_ajp.
> Although mod_rewrite can be used, it lacks the AJP
> protocol configuration (uses defaults).
>
> Regards,
> Mladen.
>
> ---------------------------------------------------------------------
> 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



---------------------------------------------------------------------
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


Re: mod_jk garbled - how to change JK* directives for ProxyPass?

Posted by Tom <ne...@tekennelly.gotdns.com>.
Of course you are correct about that catch 22 comment.  I did find a 
package called httpd-devel that I downloaded and I recompiled mod_jk.so 
with everything working.

Mladen Turk wrote:
> Tom wrote:
>> I would like to build mod_jk.so rather than figure out how to use 
>> mod_proxy_ajp since I just do not understand the new interface.
>>
>> The catch 22 I run into is that axps is not installed on my machine.  
>> If I had it I would just build a mod_jk.
>>
>
> There is no catch 22.
> Like for Apache 1.3.x, 2.0.x and 2.2.x the apxs
> is located and provided by apache-devel package.
>
>> I suspect will try to install apache 2.1 just to get myself working 
>> again with a prebuilt mod_jk.
>>
>
> Opportunism at large :)
>
> -- 
> Mladen.
>
> ---------------------------------------------------------------------
> 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

---------------------------------------------------------------------
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


Re: mod_jk garbled - how to change JK* directives for ProxyPass?

Posted by Mladen Turk <ml...@jboss.com>.
Tom wrote:
> I would like to build mod_jk.so rather than figure out how to use 
> mod_proxy_ajp since I just do not understand the new interface.
> 
> The catch 22 I run into is that axps is not installed on my machine.  If 
> I had it I would just build a mod_jk.
>

There is no catch 22.
Like for Apache 1.3.x, 2.0.x and 2.2.x the apxs
is located and provided by apache-devel package.

> I suspect will try to install apache 2.1 just to get myself working 
> again with a prebuilt mod_jk.
>

Opportunism at large :)

--
Mladen.

---------------------------------------------------------------------
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


Re: mod_jk garbled - how to change JK* directives for ProxyPass?

Posted by Tom <ne...@tekennelly.gotdns.com>.
I would like to build mod_jk.so rather than figure out how to use 
mod_proxy_ajp since I just do not understand the new interface.

The catch 22 I run into is that axps is not installed on my machine.  If 
I had it I would just build a mod_jk.

I suspect will try to install apache 2.1 just to get myself working 
again with a prebuilt mod_jk.

Mladen Turk wrote:
> Jim Weir wrote:
>>> From: Pid <p...@pidster.com>
>>> Tom wrote:
>>> >
>>> > Mladen Turk wrote:
>>> >> David Smith wrote:
>>
>
> You should really consider learning how to quote :)
>
>> If I am following this thread correctly it seems that with Apache 
>> 2.2.3 the better(suggested?) way to connect to Tomcat is to use 
>> mod_proxy_ajp, which is compiled into Apache by default.
>>
>
> Yes. There are some advanced load balancing things present
> in mod_jk only, but we are porting them to mod_proxy_balancer.
>
>> Is that the case?  Is this the technical direction the AJP connector 
>> will be taking?
>>
>
> Yes, mod_jk will continue to support pre 2.2 apaches and
> other servers like IIS depending on their relevance.
> For Apache 2.2+ (like said) use mod_proxy_*.
>
> Of course, we'll continue to have mod_jk buildable on
> apache 2.2+ (if you need 2.2+ and wish to keep your
> old configs).
>
> Regards,
> Mladen.
>
> ---------------------------------------------------------------------
> 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

---------------------------------------------------------------------
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


Re: mod_jk garbled - how to change JK* directives for ProxyPass?

Posted by Mladen Turk <ml...@jboss.com>.
Jim Weir wrote:
>> From: Pid <p...@pidster.com>
>> Tom wrote:
>> >
>> > Mladen Turk wrote:
>> >> David Smith wrote:
>

You should really consider learning how to quote :)

> If I am following this thread correctly it seems that with Apache 2.2.3 
> the better(suggested?) way to connect to Tomcat is to use mod_proxy_ajp, 
> which is compiled into Apache by default.
> 

Yes. There are some advanced load balancing things present
in mod_jk only, but we are porting them to mod_proxy_balancer.

> Is that the case?  Is this the technical direction the AJP connector 
> will be taking?
> 

Yes, mod_jk will continue to support pre 2.2 apaches and
other servers like IIS depending on their relevance.
For Apache 2.2+ (like said) use mod_proxy_*.

Of course, we'll continue to have mod_jk buildable on
apache 2.2+ (if you need 2.2+ and wish to keep your
old configs).

Regards,
Mladen.

---------------------------------------------------------------------
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


Re: mod_jk garbled - how to change JK* directives for ProxyPass?

Posted by Jim Weir <ja...@hotmail.com>.
>From: Pid <p...@pidster.com>
>Reply-To: p@pidster.com
>To: Tomcat Users List <us...@tomcat.apache.org>
>Subject: Re: mod_jk garbled - how to change JK* directives for ProxyPass?
>Date: Wed, 06 Sep 2006 16:50:05 +0100
>
>Do a mod_rewrite with the [P] directive for JSPs
>
>
>
>RewriteRule     ^\/(.+)\.jsp(.+)?
>	ajp://tomcat.server:8009/$1.jsp$2 [P,L]
>
>RewriteRule     ^\/(.+)\.xml(.+)?
>	ajp://tomcat.server:8009/$1.xml$2 [P,L]
>
>RewriteRule     ^\/(.+)\/j_security_check(.+)?
>	ajp://tomcat.server:8009/$1/j_security_check$2 [P,L]
>
>
>
>Or with a cluster...
>
>
>
>RewriteRule     ^\/(.+)\.jsp(.+)?
>	balancer://mycluster/$1.jsp$2 [P,L]
>
>RewriteRule     ^\/(.+)\.xml(.+)?
>	balancer://mycluster/$1.xml$2 [P,L]
>
>RewriteRule     ^\/(.+)\/j_security_check(.+)?
>	balancer://mycluster/$1/j_security_check$2 [P,L]
>
>
>
>
>Tom wrote:
> > Now, after implementing mod_proxy_ajp, I do not have a clue how to
> > change all of the JK* settings to use the new mod_proxy_ajp approach.
> > Previously I used  JKmount /*.jsp worker1
> >
> > I am not sure how to use a <Location> for a <LocationMatch>.  I did
> > experiment with <LocationMatch ".jsp"> but that did not seem to work.
> >
> > Mladen Turk wrote:
> >> David Smith wrote:
> >>> And the Apache httpd module API is as far as I understand a moving
> >>> target.  Modules for 2.0.x are not compatible with 2.2.  Try one
> >>> built for 2.2, or if available,
> >>
> >> It is not available, neither it will be.
> >> The preferred solution is to use the mod_proxy with
> >> mod_proxy_ajp and mod_proxy_balancer.
> >>
> >>> use the mod_rewrite for 2.2.  It's supposed to be able to handle the
> >>> AJP/1.3 protocol.
> >>>
> >>
> >> Use mod_proxy and mod_proxy_ajp.
> >> Although mod_rewrite can be used, it lacks the AJP
> >> protocol configuration (uses defaults).
> >>
> >> Regards,
> >> Mladen.
> >>
> >> ---------------------------------------------------------------------
> >> 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
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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
> >
> >
> >
>
>
>---------------------------------------------------------------------
>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
>

If I am following this thread correctly it seems that with Apache 2.2.3 the 
better(suggested?) way to connect to Tomcat is to use mod_proxy_ajp, which 
is compiled into Apache by default.

Is that the case?  Is this the technical direction the AJP connector will be 
taking?

Jim

_________________________________________________________________
Check the weather nationwide with MSN Search: Try it now!  
http://search.msn.com/results.aspx?q=weather&FORM=WLMTAG


---------------------------------------------------------------------
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


Re: mod_jk garbled - how to change JK* directives for ProxyPass?

Posted by Pid <p...@pidster.com>.
Do a mod_rewrite with the [P] directive for JSPs



RewriteRule     ^\/(.+)\.jsp(.+)?
	ajp://tomcat.server:8009/$1.jsp$2 [P,L]

RewriteRule     ^\/(.+)\.xml(.+)?
	ajp://tomcat.server:8009/$1.xml$2 [P,L]

RewriteRule     ^\/(.+)\/j_security_check(.+)?
	ajp://tomcat.server:8009/$1/j_security_check$2 [P,L]



Or with a cluster...



RewriteRule     ^\/(.+)\.jsp(.+)?
	balancer://mycluster/$1.jsp$2 [P,L]

RewriteRule     ^\/(.+)\.xml(.+)?
	balancer://mycluster/$1.xml$2 [P,L]

RewriteRule     ^\/(.+)\/j_security_check(.+)?
	balancer://mycluster/$1/j_security_check$2 [P,L]




Tom wrote:
> Now, after implementing mod_proxy_ajp, I do not have a clue how to
> change all of the JK* settings to use the new mod_proxy_ajp approach.
> Previously I used  JKmount /*.jsp worker1
> 
> I am not sure how to use a <Location> for a <LocationMatch>.  I did
> experiment with <LocationMatch ".jsp"> but that did not seem to work.
> 
> Mladen Turk wrote:
>> David Smith wrote:
>>> And the Apache httpd module API is as far as I understand a moving
>>> target.  Modules for 2.0.x are not compatible with 2.2.  Try one
>>> built for 2.2, or if available,
>>
>> It is not available, neither it will be.
>> The preferred solution is to use the mod_proxy with
>> mod_proxy_ajp and mod_proxy_balancer.
>>
>>> use the mod_rewrite for 2.2.  It's supposed to be able to handle the
>>> AJP/1.3 protocol.
>>>
>>
>> Use mod_proxy and mod_proxy_ajp.
>> Although mod_rewrite can be used, it lacks the AJP
>> protocol configuration (uses defaults).
>>
>> Regards,
>> Mladen.
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> 


---------------------------------------------------------------------
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


Re: mod_jk garbled - how to change JK* directives for ProxyPass?

Posted by edward pedersson <cp...@googlemail.com>.
With JKMount you would have done this with the location

 <LocationMatch */*.jsp>
     JkMount worker1
     Order allow,deny
     Allow from all
 </LocationMatch>

but I think with the mod_proxy_ajp you need to do something like this

ProxyPass $1.jsp ajp://localhost:8009/$1.jsp

don't know if that will actually work as i am not an apache guru.

-- e


On 06/09/06, Tom <ne...@tekennelly.gotdns.com> wrote:
>
> Now, after implementing mod_proxy_ajp, I do not have a clue how to
> change all of the JK* settings to use the new mod_proxy_ajp approach.
> Previously I used  JKmount /*.jsp worker1
>
> I am not sure how to use a <Location> for a <LocationMatch>.  I did
> experiment with <LocationMatch ".jsp"> but that did not seem to work.
>
> Mladen Turk wrote:
> > David Smith wrote:
> >> And the Apache httpd module API is as far as I understand a moving
> >> target.  Modules for 2.0.x are not compatible with 2.2.  Try one
> >> built for 2.2, or if available,
> >
> > It is not available, neither it will be.
> > The preferred solution is to use the mod_proxy with
> > mod_proxy_ajp and mod_proxy_balancer.
> >
> >> use the mod_rewrite for 2.2.  It's supposed to be able to handle the
> >> AJP/1.3 protocol.
> >>
> >
> > Use mod_proxy and mod_proxy_ajp.
> > Although mod_rewrite can be used, it lacks the AJP
> > protocol configuration (uses defaults).
> >
> > Regards,
> > Mladen.
> >
> > ---------------------------------------------------------------------
> > 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
>
>
>
> ---------------------------------------------------------------------
> 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
>
>


-- 


-- e