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


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to