Tomcat doesn't create the mod_jk.conf-auto file
4 posts in topic
Flat View  Flat View

Posted By:   Sylvain_Thevoz
Posted On:   Wednesday, April 17, 2002 06:20 AM


I'm using Tomcat 4.0 (with Jboss server) and I want to use the Apache web server as front-end.

I know that Tomcat creates a file called "mod_jk.conf-auto" to connect with Apache. But when I start Tomcat, this file isn't created.

Could you help me?

Thank you
Sylvain Thevoz

Re: Tomcat doesn't create the mod_jk.conf-auto file

Posted By:   Tonte_Pouncil  
Posted On:   Wednesday, April 24, 2002 09:24 AM

Okay I have the answer. First you need to have both Apache 2.0.35 runnning and Jakarta-Tomcat 4.0.3 running successfully as standalone applications.

Step 1.Since Tomcat doesn't make the mod_jk.dll file for you when you start up tomcat using "startup -jkconf", you will need to download it form http://www.acg-gmbh.de/mod_jk/ . And then place it in your Apache's modules directory.

Step 2.Add these lines of code to the bottom of your httpd.conf file for Apache2.0.35

### Section EXTRA: Tomcat-Binding


# Using mod_jk.dll to redirect dynamic calls to Tomcat

LoadModule jk_module modules/mod_jk.dll

JkWorkersFile "[...]/tomcat4.0.3/conf/workers.properties"

JkLogFile "[...]/tomcat4.0.3/logs/mod_jk.log"

JkMount /servlet/* ajp13

JkMount /*.jsp ajp13

Step 3. Since Tomcat4.0.3 doesn't come with workers.properties file, you will either have to just create one your self using the configurations below or use the worker.properties file that comes with Tomcat 3.2.3. I used the workers.properties file from Tomcat 3.2.3 and modified it with the configurations below. Save this file in your Tomcat's conf directory.

workers.tomcat_home=[...] omcat4.0.3








Step 4. Shutdown both Apache and Tomcat and restart in this order. Tomcat first you may what you use this command "startup -jkconf". However I don't think it makes any difference. And then start up Apache.

Step 5. Testing your Apache2.035/Tomcat4.0.3 connection. Open up a web browser and go to http://localhost/examples/jsp/dates/date.jsp

If you see the time being display then you have successfully connected the Apache2.0.35 to Tomcat 4.0.3

This works. Additionally, have a look at the docs (and edit server.xml and
web.xml to meet your needs).

Hope it helps

Tonté Pouncil


Re: Tomcat doesn't create the mod_jk.conf-auto file

Posted By:   glenn_bullock  
Posted On:   Friday, April 19, 2002 01:40 PM

You need to start tomcat with the parameter: jkconf.

This tells tomcat to write out a file called mod_jk.conf in the conf/auto sub-dir. Tomcat then dies so you'll need to restart it without that param.

(At least that's the change I found from 3.2 to 3.3.1)



Glenn B

Re: Tomcat doesn't create the mod_jk.conf-auto file

Posted By:   Colin_Bester  
Posted On:   Wednesday, April 17, 2002 02:13 PM

I too was battling with this with Tomcat 4.01 and decided to try version 4.03 before I gave up. I download jakarta-tomcat-4.0.3 and it created the mod_jk.conf-auto file but I noticed that it only had one entry in it and didn't include any of the and JkMount lines that version 3 did. I haven't had the time to look any further. Maybe you want to try version 4.03 and let me know.


Re: Tomcat doesn't create the mod_jk.conf-auto file

Posted By:   Christopher_Koenigsberg  
Posted On:   Wednesday, April 17, 2002 06:36 AM

We weren't getting it either.

So someone here wrote a shellscript, "deploy.sh" to manually add the WebAppDeploy line to the Apache config, for a new WAR file (and copy it to Tomcat's web-apps dir, and archive any old versions, and add to a deployment log, and restart Apache and Tomcat, etc.).

About | Sitemap | Contact