Hello Christopher
From what you say below, it appears that you find
apache fronting tomcat via mod_jk to be a very workable
setup. Since most posts are from people seeking help for
problems, the view I usually get is skewed toward the
non-robust.
But since it appears your experiences have been positive,
I would like to ask several questions. These are apropos of
the following:
I had successfully set up tomcat behind apache via
mod_proxy, but found it to be noticeably slower than
tomcat behind pound (2.1.3) reverse-proxy/load-balancer.
On the other hand, a post about 3 months ago stated that
mod_proxy was only about 33% slower than mod_jk, in what
appeared to be a legitimate benchmarking effort (I hedge my
statements here, as you can see, since benchmarking
methodology, like the "science" of statistics, can be
controversial and often misused).
Note that in my current configuration, the pound currently
fronts apache (2.2.3, with mod_php, mod_perl), tomcat 5.0.28,
and two mongrel/rails clusters, but I had previously gotten
apache mod_proxy_balancer to front mongrel clusters, and
that seemed stable. (Thus, apache would be able to support
and front all my needs - and would be my preferred frontend - if
it was fast enough with tomcat.)
So, finally (whew!!) Question: (and this is, I agree, somewhat
subjective):
Do you find apache -> mod_jk -> tomcat to be "Fast" ?
Do you find it as fast as tomcat alone ? (Well, by definition,
putting something in between two other things can only make a
process slower, but "apparency" is important on the web.)
So the question really is:
Is apache fronting tomcat via mod_jk apparently fast ?
(to your taste and needs, of course).
Maurice Yarrow
Christopher Schultz wrote:
Barak,
we trying to connect Apache 2.2 to Tomcat 5.0 using mod_jk on [Linux]
(Fedora Core 5).
When trying to use the SO binaries from the apache site I got the
"module is grabled" error message.
#1: Apache site does not host Linux binaries for mod_jk (IIRC)
#2: "Module is garbled" ---> apache version mismatch.
You probably have a module compiled for Apache 2.0.x and you are using
Apache 2.2.x. Just compile the module yourself. It's shockingly easy.
From there we tried to build mod_jk on our machines but could not find
any of the commands used in buildconf shell script.
You shouldn't have to play around with buildconf. From the BUILD.txt
file that ships with tomcat-connectors-1.2.18-src:
For the impatient Apache admins:
$> cd native
$> ./configure --with-apxs=/usr/sbin/apxs (or where ever the apxs/apxs2 is)
$> make
$> su -c 'make install'
Did you try that? If it didn't work, what error did you get? Most Linux
systems ought to be able to do this right out of the box. About all you
need is gcc and make (okay, and maybe autoconf).
We tried to use mod_proxy_ajp instead but, again, failed to get the
proper binaries.
mod_proxy(_ajp) comes with Apache. If you compiled Apache yourself, then
you should just be able to re-compile it with mod_proxy support turned
on (see ./configure --help in the Apache distro). If you got a binary
distro (likely since you are using FC5) then you probably already have
mod_proxy.do lying around somewhere. All you should have to do is enable it.
FWIW, I have had horrible luck with mod_proxy_ajp. It's great for
super-simple configurations, but fronting Tomcat with Apache on any
reasonably-complex webapp setup pretty much requires mod_jk. I find the
configuration options mroe straightforward and well-documented. The last
time I checked (maybe 6 months ago), documentation for mod_proxy_ajp was
pretty much non-existent. I had to make educated guesses about how to
actually set it up to talk to Tomcat. It worked, but we ended up having
to do some pretty nasty mod_rewrite configs to make it half work, and
even then it acted funny.
Can anyone please help we get (or build) either the proper mod_jk or
mod_proxy_ajp modules?
To recap:
1. mod_jk.so isn't available in binary form. Don't trust anyone who
offers it to you ;) Just compile it yourself.
2. mod_proxy comes with Apache. Look around for it.
In addition, can anyone please put down in simple words ther main
differences between the two. I saw that mod_proxy is way easier to
configer but has some security holes. Can anyone tell me what these
holes are?
I am unaware of any security holes... someone else will have to comment
on that. See above for my complaints about mod_proxy. MY understanding
is that mod_proxy_ajp grew out of all the bitter complaints about how
hard getting mod_jk were for some users. I don't understand their
complaints, since mod_jk has compiled and worked like a dream for me
every single time since many many years ago. I believe that mod_jk has
more robust configuration options (and it's older, so I would guess more
stable and well-tested).
-chris
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]