[opencms-dev] Concepts on Apache+Tomcat

Iván V.G. ivelamazan at gmail.com
Fri Feb 6 11:40:04 CET 2009


Hi again:

I'm trying to configure OpenCms with Tomcat+Apache, for many days now,
and I'm getting more and more confused each time. I've read a lot of
documentation, forums, mail archives, etc. and now I can't be sure of
what I'm really doing. I've been trying many configurations without
much success, and I'm beginning to think all I'm doing is messing up
the system configuration and my concepts.

I need the following: I have a dedicated server in which I need to
install several applications (some using PHP & Apache, and some using
Java & Tomcat), one of that being OpenCms. I also need to have
dedicated subdomains for them; for example: www.domain.com for the web
using OpenCms served by Tomcat, support.domain.com for a PHP ticketing
system served by Apache, etc. By the moment, I pretend to run just one
site within OpenCms (maybe later will do another ones, but I need to
control first the simpler configuration). We also could use other
Tomcat applications besides OpenCms. We don't want to see ":8180" in
the URL of the Tomcat applications, and generally we prefer to have
the cleanest possible URL's.

This is my technical context: I'm using Debian 4.0, with Java, Apache
and Tomcat installed from the repositories, and working fine
separately. OpenCms is also working, installed as the ROOT application
of Tomcat and with the main servlet renamed from "opencms" to "cms".
By the moment there is just one site inside OpenCms.

>From what I've read, there are at least two ways of joining Tomcat and
Apache: one is using mod_jk and other is using mod_proxy. At the
beginning I wen't configuring mod_jk, which after some efforts worked
well, although it still showed the ":8180" URL. I thought I could get
rid of it using mod_jk, but now I think it has nothing to do with it,
isn't it? I now suppose that "mod_jk" just joins Apache and Tomcat,
but to "play" with the URL's you have to use "mod_proxy" (or is it
"mod_rewrite"?), isn't it?

Moreover, regarding Apache HTTPd configuration, I'm not sure if I have
to define different sites or virtual hosts (In fact I'm not sure if
they're the same thing!). I've tried two options: a) defining a new
"site" in "sites-available" just for the "www.domain.com" and b)
making two different configurations at the "default" site, one for
"*:80" and another for "*:8180".

I've got several configuration examples on my desk, but now I don't
now which one should I follow. I really need some guidance and help on
this. Thank you very much in advance.

-- 
··--< Iván V. G. >--··



More information about the opencms-dev mailing list