You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Fenlason, Josh" <jf...@ptc.com> on 2005/12/20 22:39:04 UTC
mod_proxy_ajp
With the new proxy_ajp module it doesn't seem possible to only pass
dynamic content to the servlet engine as was possible with mod_jk.
With mod_jk you could have apache serve static content and tomcat serve
dynamic content:
JkMount /servlet/* ajp13
JkMount /*.jsp ajp13
JkMount /*.jsp/* ajp13
As far as I can tell, there aren't any proxy directives to accomplish
the same thing. Am I missing something? Or is this by design? If so,
is there a recommended way to accomplish the same thing using proxy_ajp
and other modules?
Re: mod_proxy_ajp
Posted by Joost de Heer <jo...@sanguis.xs4all.nl>.
> RewriteCond %{HTTP_REQUEST} *.jsp
> RewriteRule ^/(.*) ajp://tomcat.host/$1 [P]
By the way, I couldn't find anything about the ajp:// protocol in the
mod_proxy or mod_proxy_ajp documentation page, I got it from a mod_proxy
presentation on http://people.apache.org/~mturk. So I'm not 100% sure it works
this way. If it does, could someone add it to the documentation?
Joost
Re: mod_proxy_ajp
Posted by Joost de Heer <jo...@sanguis.xs4all.nl>.
Fenlason, Josh wrote:
> With the new proxy_ajp module it doesn't seem possible to only pass
> dynamic content to the servlet engine as was possible with mod_jk.
>
> With mod_jk you could have apache serve static content and tomcat serve
> dynamic content:
> JkMount /servlet/* ajp13
> JkMount /*.jsp ajp13
> JkMount /*.jsp/* ajp13
I think the following should work:
RewriteCond %{HTTP_REQUEST} *.jsp
RewriteRule ^/(.*) ajp://tomcat.host/$1 [P]
Joost
Re: mod_proxy_ajp
Posted by Bill Barker <wb...@wilshire.com>.
"Joost de Heer" <jo...@sanguis.xs4all.nl> wrote in message
news:43A99828.9090704@sanguis.xs4all.nl...
> Fenlason, Josh wrote:
>> With the new proxy_ajp module it doesn't seem possible to only pass
>> dynamic content to the servlet engine as was possible with mod_jk.
>
> I discovered another method today: I had to install a tomcat connector
> today, and found the following in the documentation
> (http://tomcat.apache.org/connectors-doc/howto/apache.html):
>
> Starting with mod_jk 1.2.6, and under Apache 2.0, it's possible to exclude
> some URL/URI from jk processing by setting the env var no-jk, for example
> with the SetEnvIf Directive.
>
> So something like
>
> SetEnvIf Request_URI !.*\.jsp no-jk=true
>
> should do the trick.
>
That's specific to mod_jk. AFAIK, it won't do anything at all for
mod_proxy_ajp.
> Joost
>
Re: mod_proxy_ajp
Posted by Joost de Heer <jo...@sanguis.xs4all.nl>.
Fenlason, Josh wrote:
> With the new proxy_ajp module it doesn't seem possible to only pass
> dynamic content to the servlet engine as was possible with mod_jk.
I discovered another method today: I had to install a tomcat connector today,
and found the following in the documentation
(http://tomcat.apache.org/connectors-doc/howto/apache.html):
Starting with mod_jk 1.2.6, and under Apache 2.0, it's possible to exclude
some URL/URI from jk processing by setting the env var no-jk, for example with
the SetEnvIf Directive.
So something like
SetEnvIf Request_URI !.*\.jsp no-jk=true
should do the trick.
Joost