« Apache HTTPD + Apache Jakarta + Apache PHP = auuuughhhh... | Main | The Fête de Gèneve and the Lake Parade »

July 31, 2002

Apache three-way

OK, got it working.... and here's how...

Note: You can get nice how-tos here. Much of this solution somes from there.

To connect Apache 2 to PHP, httpd.conf should contain:

LoadModule php4_module c:/php/sapi/php4apache2.dll

AddType application/x-httpd-php .php

AddType application/x-httpd-php-source .phps

(the php4apache2.dll file is part of the php install)

To connect Apache 2 to Tomcat 4.0.4:

In httpd.conf:

LoadModule jk_module modules/mod_jk.dll

JkWorkersFile "C:/Program Files/Apache Tomcat 4.0/conf/workers.properties"

JkLogFile "C:/Program Files/Apache Tomcat 4.0/logs/mod_jk.log

JkMount /servlet/* ajp13

JkMount /*.jsp ajp13

You can get mod_jk.dll from here.

Your workers.properties should contain something like:

workers.tomcat_home="C:\Program Files\Apache Tomcat 4.0"

workers.java_home="C:\jsdk1.4.1"

ps=\

worker.list=ajp13

worker.ajp13.port=8009

worker.ajp13.host=localhost

worker.ajp13.type=ajp13

worker.ajp13.lbfactor=1

In Tomcat's server.xml:

Make sure there's an ajp13 connector defined (should already be there).

Create a context for your web stuff:

Note that the docBase is relative to the appBase, which is by default "webapps" in the tomcat directory. You can also simply define the default context (path=""), which is usedd when no other context matches.

Special note: after the connector's set up, you'll find tomcat.exe gets started as a service -- which makes it impossible to see debug info live and to easily restart it. To change this (should you wish), look at control panel/services and switch tomcat to a manually activated service.

Posted by Michael at July 31, 2002 11:22 AM

Comments

Post a comment

Thanks for signing in, . Now you can comment. (sign out)

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)


Remember me?