HOW TO INSTALL APACHE 2.0.45 and TOMCAT 4.1.x on WINDOWS XP

*If you are upgrading, uninstall old Apache and Tomcat COMPLETELY and reboot. Save your Apache htdocs and Tomcat webapps directories in another location and then add them back after upgrade)

1) Download SDK (j2sdk-1_3_1_06-win.exe) from http://java.sun.com/j2se/1.3/download.html
(I see that 1.4.1 is available, haven't tried it with that yet--should be fine)
Run executable.
I put java in default location C:\jdk1.3.1_06
Set up the environment variable JAVA_HOME to point to there. (in XP: Start - Settings - Performance -System - Advanced - Environment Variables --in Win2000 there isn't a "Performance.." icon)

2) Download binary apache-2.0.45-win32-no_ssl.msi from http://httpd.apache.org
Run the msi as you would any exe.
Apache default location: C:\Program Files\Apache Group\Apache2\

3) Download binary jakarta-tomcat-4.1.24.exe from http://jakarta.apache.org
Run the executable.
Tomcat default location: C:\Program Files\Apache Group\Tomcat 4.1\

4) I used Tomcat to build the mod_jk.conf for me by:

a) In C:\Program Files\Apache Group\Tomcat 4.1\conf\server.xml after

<Server port="8005" shutdown="SHUTDOWN" debug="0">
type in:

<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" />

b) In C:\Program Files\Apache Group\Tomcat 4.1\conf\server.xml after

<Host name="localhost" debug="0" appbase="webapps" uppackWARs="true"
... > 
type in:

<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" append="true" />

5) Start Tomcat and wala a mod_jk.conf is created in C: Program Files\Apache Group\Tomcat 4.1\conf\auto

6) Now that the mod_jk.conf is created comment out the lines you added to server.xml in Step 4.

7) Put in C:\Program Files\Apache Group\Tomcat 4.1\conf\jk a workers.properties file for Apache to read as follows (use any TEXT editor):

# Start setup file
#
workers.tomcat_home=C:\\Program Files\\Apache Group\Tomcat 4.1
workers.java_home=C:\\jdk1.3.1_06
ps=\\
worker.list=ajp12, ajp13

# Definition for Ajp13 worker
#
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
#
# End setup file

8)At the bottom of the Apache's httpd.conf file (Start - Programs - Apache) I added a slightly edited version of the generated mod_jk.conf (I had to set the whole path for the jk_module to get it to work for me, but setting up an environment variable to Apache directory should work too):

<IfModule !mod_jk.c>
LoadModule jk_module "C:/Program Files/Apache Group/Tomcat 4.1/bin/modules/mod_jk-2.0.42.dll"
</IfModule>

JkWorkersFile "C:/Program Files/Apache Group/Tomcat 4.1/conf/jk/workers.properties"
JkLogFile "C:/Program Files/Apache Group/Tomcat 4.1/logs/mod_jk.log"

JkLogLevel emerg

JkMount /examples ajp13
JkMount /examples/* ajp13

JkMount /webdav ajp13
JkMount /webdav/* ajp13

JkMount /tomcat-docs ajp13
JkMount /tomcat-docs/* ajp13

JkMount /manager ajp13
JkMount /manager/* ajp13

9)Download mod_jk-2.0.42.dll from jakarta connector site
It says it only works with Apache 2.0.42 but it works fine with Apache 2.0.45 (Thanks to http://www.acg-gmbh.de/mod_jk/ for previously supplying us with a compiled version before jakarta did!) and put in C:\Program Files\Apache Group\Tomcat 4.1\bin\modules.

10) Start Apache.

* * *

11) Optional: Remote SSH login into your Apache/Tomcat machine:

You can use Cygwin's OpenSSH SSH2 protocol to remotely log into your Windows computer. An excellent "how to" is already written here: http://tech.erdelynet.com/cygwin-sshd.asp

12) Optional: Using MySQL with Apache/Tomcat:

Download MySQL from http://www.mysql.com/. I use the development alpha version 4 but the stable version is fine also.

Download the MySQL JDBC from http://www.mysql.com/downloads/api-jdbc.html and save it into C:\Program Files\Apache Tomcat 4.0\common\lib directory.
I used the "stable" version". Set up the environment variable CLASSPATH to point directly to the jar (not just the directory).