Ok, here is what I had done so far.
1. installing J2sdk1.4.2_09,Tomcat 4.1,Apache 2.0.54,mod_jk 1.2.14
2. set my JAVA_HOME= C:\J2sdk1.4.2_09
set my CATALINA_HOME=d:\tomcat 4.1
3. put these in my apache2 httpd.conf:
#
# Load mod_jk
#
LoadModule jk_module modules/mod_jk.dll
#
# Configure mod_jk
#
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"
4.create a workers.properties file
worker.list=worker1,worker2,worker3
# Set properties for worker1
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
# Set properties for worker2
worker.worker2.type=ajp13
worker.worker2.host=localhost
worker.worker2.port=8109
# Set properties for worker3
worker.worker3.type=ajp13
worker.worker3.host=localhost
worker.worker3.port=8209
5. create instance1, instance2 and instance3 in tomcat4 directories.
6. all the new instances folder contains webbapps, conf, log, works,temp folder.
6. port number of server.xml in conf folder in each instances folder had been modified according to worker.properties.
7. put this in httpd.conf again:
<VirtualHost *:80>
ServerName domain1
JkMount /servlets-examples/* worker1
</VirtualHost>
<VirtualHost *:80>
ServerName domain2
JkMount /servlets-examples/* worker2
</VirtualHost>
<VirtualHost *:80>
ServerName domain3
JkMount /servlets-examples/* worker3
</VirtualHost>
8. I create service for instance1, instance2 and instance3 using tcservcfg.exe from
http://web.bvu.edu/staff/david/index.jsp?section=software&subsection=tcservcfg&page=downloads 9. 3 new services had been created and can be started indepently in windows service.
So, theoritically, when I type
http://domain2/index.jsp i should get some result because I already create some
jsp file in webapps root in instance2 folder. However, I just got The page cannot be displayed message. This means I must have something wrong in my configuration above.
I had been finding ways to create multiple tomcat instances in windows for 3 days and now stucked here.
Can someone show me what I had done wrong, please guide me.
Thanks!