tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gaël Lams" <>
Subject Re: Apache 2 + Tomcat 5.0.28
Date Thu, 01 Jun 2006 08:23:35 GMT

> I have Apache 2 (as part of a `LAMP' install) and TomCat 5.0.28 installed
> on a Debian Linux: 2.6.12-1-686 system
> and I want to make Apache and Tomcat listen/connect to the same port.

2 services can not listen to the same port, you probably want Apache
to listen to port 80 and Tomcat on another port and configure the
mod_jk apache module + the Java-based Connector on the Tomcat end to
passe the data between the two.

> After a little searching I found:
> which describes how JK2 is a refactoring of JK which replaced JSERV,
> but then I read else where that JK2 is no longer supported and all
> the `useful' bits from JK2 are now in JK.
> ....
> ... should I rename these? ... and if so, to what?

Yes, one or two pages contain wrong information, the situation is the following:
- if you can, use apache 2.2.x and mod_proxy_ajp
- if you prefer, or have to, use apache 2.0, use mod_jk. In this case,
I wouldn't use a connector build for another distribution: download
the source from tomcat's web site and compile following the
Then you need to setup working entities, i.e Workers, between the
apache and Tomcat engines using the mandatory file
(A Tomcat worker is a Tomcat instance that is waiting to execute
servlets or any other content on behalf of some web server).
Concrete steps are:
1 Create a file in your httpd's configuration folder
2 Add the module "jk" to the list of apache modules
3 modify your httpd.conf to point to the workers file, something like
JkSet config.file /etc/httpd/
4 create the file in your tomcat root.
5 (optional) Create an apache virtual host "dedicated" to tomcat,
something like:
<VirtualHost myhost:80>
    ServerAdmin webmaster@myhost
    ServerName myhost

    DocumentRoot "/opt/jakarta/tomcat/webapps"

    ErrorLog /var/log/httpd/myhost-error_log
    CustomLog /var/log/httpd/myhost-access_log combined

<Location "/*">
   JkUriSet worker ajp13:localhost:8009


Hope it helps


View raw message