Hi

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:

  http://tomcat.apache.org/connectors-doc-archive/jk2/index.html

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.
....
jakarta-tomcat-connectors-jk-1.2.14-linux-sles9-x86_64-prefork.so
jakarta-tomcat-connectors-jk-1.2.14-linux-sles9-x86_64-worker.so

... 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
instructions.
Then you need to setup working entities, i.e Workers, between the
apache and Tomcat engines using the mandatory workers.properties 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 workers.properties 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/workers2.properties
4 create the jk.properties file in your tomcat root.
5 (optional) Create an apache virtual host "dedicated" to tomcat,
something like:
<VirtualHost myhost:80>
   ServerAdmin [EMAIL PROTECTED]
   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
</Location>

</VirtualHost>

Hope it helps

Regards,

Gaël

Reply via email to