You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Aleksandr Jones <al...@hotmail.com> on 2002/07/24 14:40:32 UTC
Integrating Apache 2.0.36 and Tomcat 4.0.4 on Win32
Hi all,
My name is Aleksandr Jones. Greetings to all Apache of the open source
community.
I am attempting to get Apache 2.0.36 and Tomcat 4.0.4 connected, so that
static
content is served by the former and dynamic by the latter. I am running
Windows
2000 SP2 on an Intel Machine. I mainly used the galatea.com flash guide for
integrating Apache 2.0.36 and Tomcat 4.04 as a guideline for this.
I have done the following steps:
I downloaded the JDK 1.4 installation file -->
j2sdk-1_4_0_01-windows-i586.exe
My JDK 1.4 is installed in C:\j2sdk14
My environment variables are set as follows:
%JAVA_HOME% = C:\j2sdk14\
%PATH% = %PATH% --> append C:\j2sdk14\; C:\j2sdk14\bin
That's my Java stuff.
I downloaded and ran the windows installer (MSI) installation for Tomcat
4.0. I
ran the installation and put tomcat in C:\Tomcat4\
My environment variables are thusly set:
%Catalina_Home% = C:\Tomcat4\
%Tomcat_Home% = C:\Tomcat4\
Tomcat is installed as a service, so I start the sucker up and check it out:
http://localhost:8080/ --> and I immediately see the Tomcat page:
"If you're seeing this page via a web browser,
it means you've setup Tomcat successfully. Congratulations!"
There's my Tomcat stuff for now.
I downloaded the source code for Apache HTTP Server 2.0.36.
My environment variables are thusly set:
%Apache2_Home% = C:\Apache2\
%Apache_Home% = C:\Apache\
I built the INSTALLBIN configuration in my *ahem* Microsoft Visual Studio,
and it produced my Apache2 configuration.
I run Apache from the command line, and test http://localhost:80
For which it responds:
"If you can see this, it means that the installation of the Apache web
server
software on this system was successful...." etc.
Next, I downloaded Apache Ant 1.5, and extract it to C:\JakartaAnt\bin;
My environment variables are thusly set:
%PATH% = %PATH% --> append C:\JakartaAnt\bin;
There goes Ant.
Next I downloaded jakarta-tomcat-connectors-4.0.2.01-src.zip. I extracted
to the directory C:\JKConnectors\
Here is a dump of the file C:\JKConnectors\jk\build.properties
#
# sample build.properties for ajp connector.
# edit to taste...
#
# $Id: build.properties.sample,v 1.2 2001/05/29 23:05:52 seguin Exp $
#
tomcat40.home=c:/Tomcat4
apache2.home=c:/Apache2
apr.include=${apache2.home}/include
apr.lib=${apache2.home}/lib
so.debug=true
so.optimize=false
so.profile=false
Looks good, I think.
I decided to futz with Build.xml in exactly this one way:
<property name="tomcat40.home"
location="C:/tomcat4" />
I ran ANT in the directory C:\JKConnectors\jk\. That produces this output:
Buildfile: build.xml
detect:
[echo] -------- jakarta-tomcat-connectors --------
guess_catalina40:
guess_catalina41:
cpath:
prepare:
report:
[echo] Tomcat33: ${tomcat33.detect} ${tomcat33.home}
[echo] Tomcat40: true c:/Tomcat4
[echo] Tomcat41: ${tomcat41.detect} ${tomcat41.home}
[echo] Apache13: ${apache13.detect} ${apache13.home}
[echo] Apache2: true c:/Apache2
[echo] iPlanet: ${iplanet.detect} ${iplanet.home}
[echo] IIS: ${iis.detect} ${iis.home}
[echo] Using catalina.home: C:\Tomcat4
jkutil:
jkjava:
jkant:
build-main:
BUILD SUCCESSFUL
Total time: 2 seconds
I ran "ANT INSTALL" in the directory C:\JKConnectors\jk\.
That produces this simliar output:
Buildfile: build.xml
detect:
[echo] -------- jakarta-tomcat-connectors --------
guess_catalina40:
guess_catalina41:
cpath:
prepare:
report:
[echo] Tomcat33: ${tomcat33.detect} ${tomcat33.home}
[echo] Tomcat40: true c:/Tomcat4
[echo] Tomcat41: ${tomcat41.detect} ${tomcat41.home}
[echo] Apache13: ${apache13.detect} ${apache13.home}
[echo] Apache2: true c:/Apache2
[echo] iPlanet: ${iplanet.detect} ${iplanet.home}
[echo] IIS: ${iis.detect} ${iis.home}
[echo] Using catalina.home: C:\Tomcat4
jkutil:
jkjava:
jkant:
build-main:
install-t33:
install-t40:
install-t41:
install-a20:
install-a13:
install:
BUILD SUCCESSFUL
Total time: 2 seconds
Now, after repeatedly failing to use the
mod_jk.dll from http://www.acg-gmbh.de/mod_jk/, I went and compiled
the one in the C:\JKConnectors\JK\Native\Apache-2.0.
(Notice, these failures were marked by error messages and Apache
failing start; I excluded this data since I got past it with my
homegrown version)
So, *poof*, now I have mod_jk.dll. I copy mod_jk.dll into
C:\Apache2\Modules\ directory.
Now, I went to my Tomcat server.xml file and modified it thusly:
1.) The log file listener:
<Server port="8005" shutdown="SHUTDOWN" debug="0">
<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
modJk="c:/Apache2/modules/mod_jk.dll" jkDebug="info"
workersConfig="c:/Tomcat4/conf/jk/workers.properties"
jkLog="c:/Tomcat4/logs/mod_jk.log"/>
2.) Get the AJP Connector listening on port 8009
<Service name="Tomcat-Standalone">
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
port="8009" minProcessors="5" maxProcessors="75"
acceptCount="10" debug="0"/>
3.) Humor a suggestion from Galatea's guide ;-)
<!-- Define the default virtual host -->
<Host name="localhost" debug="0" appBase="webapps" unpackWARs="true">
<!-- Galatea's recommendation: seems to append additional data to the log
file... -->
<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
append="true" />
Next, I ran Tomcat to auto-generate the mod_jk.conf file.
My mod_jk.conf file is exactly this:
########## Auto generated on Thu Jul 18 22:10:37 CDT 2002##########
<IfModule !mod_jk.c>
LoadModule jk_module c:/Apache2/modules/mod_jk.dll
</IfModule>
JkWorkersFile "c:/Tomcat4/conf/jk/workers.properties"
JkLogFile "c:/Tomcat4/logs/mod_jk.log"
JkLogLevel info
<VirtualHost localhost>
ServerName localhost
JkMount /manager ajp13
JkMount /manager/* ajp13
JkMount /examples ajp13
JkMount /examples/* ajp13
JkMount /tomcat-docs ajp13
JkMount /tomcat-docs/* ajp13
JkMount /webdav ajp13
JkMount /webdav/* ajp13
JkMount /jk ajp13
JkMount /jk/* ajp13
</VirtualHost>
C:\Tomcat4\conf\jk\worker.properties --> it's contents:
workers.tomcat_home=C:/Tomcat4
workers.java_home=C:/J2SDK14
ps=\
worker.list=ajp13, ajp14
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1
worker.ajp14.port=8010
worker.ajp14.host=localhost
worker.ajp14.type=ajp14
worker.ajp14.secretkey=secret
worker.ajp14.credentials=myveryrandomentropy
worker.ajp14.lbfactor=1
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp13
worker.inprocess.type=jni
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar
worker.inprocess.cmd_line=start
worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)jvm.dll
worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout
worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr
Alright, and now finally, my httpd.conf file contains a line:
Include c:/tomcat4/conf/auto/mod_jk.conf
which obviously references my mod_jk.conf file with the Load Module
directive.
With all of this, I get the following page in my browser:
Server error!
Error message:
handler "jakarta-servlet" not found for: examples
If you think this is a server error, please contact the webmaster
And that's it, thus far. Does anyone know what I'm doing wrong?
Any questions, did I leave anything out?
Many many thanks for listening -- and hopefully helping :-D
Aleksandr
_________________________________________________________________
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Integrating Apache 2.0.36 and Tomcat 4.0.4 on Win32
Posted by Rick Reumann <ma...@reumann.net>.
I basically did the install like you did below and everything works
fine for me when I just use 'localhost' and try the stuff on the
particular machine where everything resides. However no matter what I
try I can not get apache2.0.39 to pick up any Tomcat applications when
typing in the url from another machine. I'm tyring to set up under a
different port 7000... and
http://afs.outback.com:7000/ brings up apache fine
http://afs.outback.com:8080/myApp/ brings up tomcat fine
http://afs.outback.com:7000/myApp/ no good doesn't serve up my tomcat
app
However running on the machine where the server is and use localhost
above and everything is fine.
Very frustrating that I can't find documentation on this.
If anyone has ideas let me know.
Aleksandr, double check your set up with this doc
http://mpcon.org/temp/how2install_apache_w_php_jsp_support.doc
It worked fine for mine under localhost but still having problems
above.
On Wednesday, July 24, 2002, 8:40:32 AM, Aleksandr wrote:
AJ> Hi all,
AJ> My name is Aleksandr Jones. Greetings to all Apache of the open source
AJ> community.
AJ> I am attempting to get Apache 2.0.36 and Tomcat 4.0.4 connected, so that
AJ> static
AJ> content is served by the former and dynamic by the latter. I am running
AJ> Windows
AJ> 2000 SP2 on an Intel Machine. I mainly used the galatea.com flash guide for
AJ> integrating Apache 2.0.36 and Tomcat 4.04 as a guideline for this.
AJ> I have done the following steps:
AJ> I downloaded the JDK 1.4 installation file -->
AJ> j2sdk-1_4_0_01-windows-i586.exe
AJ> My JDK 1.4 is installed in C:\j2sdk14
AJ> My environment variables are set as follows:
AJ> %JAVA_HOME% = C:\j2sdk14\
%PATH% = %PATH% -->> append C:\j2sdk14\; C:\j2sdk14\bin
AJ> That's my Java stuff.
AJ> I downloaded and ran the windows installer (MSI) installation for Tomcat
AJ> 4.0. I
AJ> ran the installation and put tomcat in C:\Tomcat4\
AJ> My environment variables are thusly set:
AJ> %Catalina_Home% = C:\Tomcat4\
AJ> %Tomcat_Home% = C:\Tomcat4\
AJ> Tomcat is installed as a service, so I start the sucker up and check it out:
AJ> http://localhost:8080/ --> and I immediately see the Tomcat page:
AJ> "If you're seeing this page via a web browser,
AJ> it means you've setup Tomcat successfully. Congratulations!"
AJ> There's my Tomcat stuff for now.
AJ> I downloaded the source code for Apache HTTP Server 2.0.36.
AJ> My environment variables are thusly set:
AJ> %Apache2_Home% = C:\Apache2\
AJ> %Apache_Home% = C:\Apache\
AJ> I built the INSTALLBIN configuration in my *ahem* Microsoft Visual Studio,
AJ> and it produced my Apache2 configuration.
AJ> I run Apache from the command line, and test http://localhost:80
AJ> For which it responds:
AJ> "If you can see this, it means that the installation of the Apache web
AJ> server
AJ> software on this system was successful...." etc.
AJ> Next, I downloaded Apache Ant 1.5, and extract it to C:\JakartaAnt\bin;
AJ> My environment variables are thusly set:
%PATH% = %PATH% -->> append C:\JakartaAnt\bin;
AJ> There goes Ant.
AJ> Next I downloaded jakarta-tomcat-connectors-4.0.2.01-src.zip. I extracted
AJ> to the directory C:\JKConnectors\
AJ> Here is a dump of the file C:\JKConnectors\jk\build.properties
AJ> #
AJ> # sample build.properties for ajp connector.
AJ> # edit to taste...
AJ> #
AJ> # $Id: build.properties.sample,v 1.2 2001/05/29 23:05:52 seguin Exp $
AJ> #
AJ> tomcat40.home=c:/Tomcat4
AJ> apache2.home=c:/Apache2
AJ> apr.include=${apache2.home}/include
AJ> apr.lib=${apache2.home}/lib
AJ> so.debug=true
AJ> so.optimize=false
AJ> so.profile=false
AJ> Looks good, I think.
AJ> I decided to futz with Build.xml in exactly this one way:
AJ> <property name="tomcat40.home"
AJ> location="C:/tomcat4" />
AJ> I ran ANT in the directory C:\JKConnectors\jk\. That produces this output:
AJ> Buildfile: build.xml
AJ> detect:
AJ> [echo] -------- jakarta-tomcat-connectors --------
AJ> guess_catalina40:
AJ> guess_catalina41:
AJ> cpath:
AJ> prepare:
AJ> report:
AJ> [echo] Tomcat33: ${tomcat33.detect} ${tomcat33.home}
AJ> [echo] Tomcat40: true c:/Tomcat4
AJ> [echo] Tomcat41: ${tomcat41.detect} ${tomcat41.home}
AJ> [echo] Apache13: ${apache13.detect} ${apache13.home}
AJ> [echo] Apache2: true c:/Apache2
AJ> [echo] iPlanet: ${iplanet.detect} ${iplanet.home}
AJ> [echo] IIS: ${iis.detect} ${iis.home}
AJ> [echo] Using catalina.home: C:\Tomcat4
AJ> jkutil:
AJ> jkjava:
AJ> jkant:
AJ> build-main:
AJ> BUILD SUCCESSFUL
AJ> Total time: 2 seconds
AJ> I ran "ANT INSTALL" in the directory C:\JKConnectors\jk\.
AJ> That produces this simliar output:
AJ> Buildfile: build.xml
AJ> detect:
AJ> [echo] -------- jakarta-tomcat-connectors --------
AJ> guess_catalina40:
AJ> guess_catalina41:
AJ> cpath:
AJ> prepare:
AJ> report:
AJ> [echo] Tomcat33: ${tomcat33.detect} ${tomcat33.home}
AJ> [echo] Tomcat40: true c:/Tomcat4
AJ> [echo] Tomcat41: ${tomcat41.detect} ${tomcat41.home}
AJ> [echo] Apache13: ${apache13.detect} ${apache13.home}
AJ> [echo] Apache2: true c:/Apache2
AJ> [echo] iPlanet: ${iplanet.detect} ${iplanet.home}
AJ> [echo] IIS: ${iis.detect} ${iis.home}
AJ> [echo] Using catalina.home: C:\Tomcat4
AJ> jkutil:
AJ> jkjava:
AJ> jkant:
AJ> build-main:
AJ> install-t33:
AJ> install-t40:
AJ> install-t41:
AJ> install-a20:
AJ> install-a13:
AJ> install:
AJ> BUILD SUCCESSFUL
AJ> Total time: 2 seconds
AJ> Now, after repeatedly failing to use the
AJ> mod_jk.dll from http://www.acg-gmbh.de/mod_jk/, I went and compiled
AJ> the one in the C:\JKConnectors\JK\Native\Apache-2.0.
AJ> (Notice, these failures were marked by error messages and Apache
AJ> failing start; I excluded this data since I got past it with my
AJ> homegrown version)
AJ> So, *poof*, now I have mod_jk.dll. I copy mod_jk.dll into
AJ> C:\Apache2\Modules\ directory.
AJ> Now, I went to my Tomcat server.xml file and modified it thusly:
AJ> 1.) The log file listener:
AJ> <Server port="8005" shutdown="SHUTDOWN" debug="0">
AJ> <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
AJ> modJk="c:/Apache2/modules/mod_jk.dll" jkDebug="info"
AJ> workersConfig="c:/Tomcat4/conf/jk/workers.properties"
AJ> jkLog="c:/Tomcat4/logs/mod_jk.log"/>
AJ> 2.) Get the AJP Connector listening on port 8009
AJ> <Service name="Tomcat-Standalone">
AJ> <!-- Define an AJP 1.3 Connector on port 8009 -->
AJ> <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
AJ> port="8009" minProcessors="5" maxProcessors="75"
AJ> acceptCount="10" debug="0"/>
AJ> 3.) Humor a suggestion from Galatea's guide ;-)
AJ> <!-- Define the default virtual host -->
AJ> <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true">
AJ> <!-- Galatea's recommendation: seems to append additional data to the log
file... -->>
AJ> <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
AJ> append="true" />
AJ> Next, I ran Tomcat to auto-generate the mod_jk.conf file.
AJ> My mod_jk.conf file is exactly this:
AJ> ########## Auto generated on Thu Jul 18 22:10:37 CDT 2002##########
AJ> <IfModule !mod_jk.c>
AJ> LoadModule jk_module c:/Apache2/modules/mod_jk.dll
AJ> </IfModule>
AJ> JkWorkersFile "c:/Tomcat4/conf/jk/workers.properties"
AJ> JkLogFile "c:/Tomcat4/logs/mod_jk.log"
AJ> JkLogLevel info
AJ> <VirtualHost localhost>
AJ> ServerName localhost
AJ> JkMount /manager ajp13
AJ> JkMount /manager/* ajp13
AJ> JkMount /examples ajp13
AJ> JkMount /examples/* ajp13
AJ> JkMount /tomcat-docs ajp13
AJ> JkMount /tomcat-docs/* ajp13
AJ> JkMount /webdav ajp13
AJ> JkMount /webdav/* ajp13
AJ> JkMount /jk ajp13
AJ> JkMount /jk/* ajp13
AJ> </VirtualHost>
AJ> C:\Tomcat4\conf\jk\worker.properties --> it's contents:
AJ> workers.tomcat_home=C:/Tomcat4
AJ> workers.java_home=C:/J2SDK14
AJ> ps=\
AJ> worker.list=ajp13, ajp14
AJ> worker.ajp13.port=8009
AJ> worker.ajp13.host=localhost
AJ> worker.ajp13.type=ajp13
AJ> worker.ajp13.lbfactor=1
AJ> worker.ajp14.port=8010
AJ> worker.ajp14.host=localhost
AJ> worker.ajp14.type=ajp14
AJ> worker.ajp14.secretkey=secret
AJ> worker.ajp14.credentials=myveryrandomentropy
AJ> worker.ajp14.lbfactor=1
AJ> worker.loadbalancer.type=lb
AJ> worker.loadbalancer.balanced_workers=ajp13
AJ> worker.inprocess.type=jni
AJ> worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar
AJ> worker.inprocess.cmd_line=start
AJ> worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(ps)jvm.dll
AJ> worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout
AJ> worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr
AJ> Alright, and now finally, my httpd.conf file contains a line:
AJ> Include c:/tomcat4/conf/auto/mod_jk.conf
AJ> which obviously references my mod_jk.conf file with the Load Module
AJ> directive.
AJ> With all of this, I get the following page in my browser:
AJ> Server error!
AJ> Error message:
AJ> handler "jakarta-servlet" not found for: examples
AJ> If you think this is a server error, please contact the webmaster
AJ> And that's it, thus far. Does anyone know what I'm doing wrong?
AJ> Any questions, did I leave anything out?
AJ> Many many thanks for listening -- and hopefully helping :-D
AJ> Aleksandr
AJ> _________________________________________________________________
AJ> Join the worlds largest e-mail service with MSN Hotmail.
AJ> http://www.hotmail.com
AJ> --
AJ> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
AJ> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
Rick
mailto:maillist@reumann.net
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>