Tomcat4 and mod_jk (URGENT)
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   HELIGON_Sandra
Posted On:   Wednesday, July 31, 2002 01:23 AM

I modified the Apache2.0.39 (httpd.conf) and Tomcat4.0.4 (server.xml) configurations because I want that they work together. I can start Tomcat and Apache but I have some problems. The tomcat-apache.conf file is not generated automatically what element in the configuration is responsible of that ? I can not access to the web applications defined under the tomcat4/webapps directory. The command http://localhost works but the command http://localhost/examples doesn't work (error:The requested URL was not found on this server). How does the web server know the location of the webapps directory ? I have no context element in the server.xml because I would like that the web a   More>>

I modified the Apache2.0.39 (httpd.conf) and Tomcat4.0.4 (server.xml)
configurations because I want that they work together.
I can start Tomcat and Apache but I have some problems.
The tomcat-apache.conf file is not generated automatically
what element in the configuration is responsible of that ?
I can not access to the web applications defined under the
tomcat4/webapps directory.
The command http://localhost works but the command
http://localhost/examples doesn't work
(error:The requested URL was not found on this server).
How does the web server know the location of the webapps directory ?
I have no context element in the server.xml because
I would like that the web applications could be automatically
deployed.
Is it possible with mod_jk module or do I have to use
the mod_webapp module ?
If someone has a version of mod_webapp.dll I am
interested.

Thanks a lot in advance.

   <<Less

Re: Tomcat4 and mod_jk (URGENT)

Posted By:   Aaron_Kelty  
Posted On:   Wednesday, July 31, 2002 06:59 AM

Yes, you can use mod_jk. I am using the same Apache and Tomcat versions on Windows 2000, and am using the mod_jk - mod_jk.dll from http://www.acg-gmbh.de/mod_jk/. I created a mod_jk.conf file and included it in the httpd.conf with the directive Include conf/mod_jk.conf . The mod_jk.dll is in the modules directory under apache. Here's an example





#
# The following line instructs Apache to load the jk module
#
LoadModule jk_module modules/mod_jk.dll


JkWorkersFile "C:/tomcat/conf/workers.properties"
JkLogFile "C:/apache/logs/mod_jk.log"

#
# Log level to be used by mod_jk
#
JkLogLevel error

#########################################################
# Configuration for the /example context starts.
#########################################################

#
# The following line makes apache aware of the location of the /example context
#
Alias /example "C:/tomcat/webapps/example"

Options Indexes FollowSymLinks


#
# The following line mounts all JSP files and the /servlet/ uri to tomcat
#
JkMount /example/servlet/* ajp13
JkMount /example/*.jsp ajp13

#
# The following line prohibits users from directly accessing WEB-INF
#

AllowOverride None
deny from all

#
# Use Directory too. On Windows, Location doesn't work unless case matches
#

AllowOverride None
deny from all


#
# The following line prohibits users from directly accessing META-INF
#

AllowOverride None
deny from all

#
# Use Directory too. On Windows, Location doesn't work unless case matches
#

AllowOverride None
deny from all


#######################################################
# Configuration for the /example context ends.
#######################################################



Worker properties



#
# workers.tomcat_home should point to the location where you
# installed tomcat. This is where you have your conf, webapps and lib
# directories.
#
workers.tomcat_home=c: omcat

#
# workers.java_home should point to your Java installation. Normally
# you should have a bin and lib directories beneath it.
#
workers.java_home=c:jdk1_3_1

#
# You should configure your environment slash... ps= on NT and / on UNIX
# and maybe something different elsewhere.
#
ps=
# ps=/


#
#------ DEFAULT worket list ------------------------------------------
#---------------------------------------------------------------------
#
#
# The workers that your plugins should create and work with
#
worker.list=ajp12, ajp13


#
#------ DEFAULT ajp13 WORKER DEFINITION ------------------------------
#---------------------------------------------------------------------
#

#
# Defining a worker named ajp13 and of type ajp13
# Note that the name and the type do not have to match.
#
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
# ----> lbfactor must be > 0
# ----> Low lbfactor means less work done by the worker.
worker.ajp13.lbfactor=1

#
# Specify the size of the open connection cache.
#worker.ajp13.cachesize



Hope this helps.

About | Sitemap | Contact