You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rohit Peyyeti <ro...@translogicsys.com> on 2003/05/31 14:14:55 UTC

Tomcat configuration error

Gurus, its been quite some time I'm trying to get this scenario
working -- but failing to do so. This is what I'm trying to achieve:

One tomcat 4 instance serving multiple tomcat web applications:
01. Every web application has one blank context defined by using
      tomcat's <HOST> tag in server.xml
02. Every web application has apache in front of it with virtual host
      for each web app.

I commented out all the connectors in server.xml except AJP13 defined
this way:

<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
                    port="8009" minProcessors="5" maxProcessors="75"
                    acceptCount="10" debug="0"/>

And hosts are defined this way:

   <!-- Test App 1 -->
   <Host name="allele-test" debug="0" appBase="/var/www/tomcat-apps"
autoDeploy="false" liveDeploy="false">
    <Context path="" docBase="/var/www/tomcat-apps/test1" debug="0"
reloadable="true"/>
   </Host>

   <!-- Custcare App -->
   <Host name="allele-test2" debug="0" appBase="/var/www/tomcat-apps"
autoDeploy="false" liveDeploy="false">
    <Context path="" docBase="/var/www/tomcat-apps/test2" debug="0"
reloadable="true"/>
   </Host>

And workers.properties is configured this way:

ps=/

worker.list=test1, test2

### For Tomcat 4 ###
worker.test1.port=8009
worker.test1.host=localhost
worker.test1.type=ajp13

worker.test2.port=8009
worker.test2.host=localhost
worker.test2.type=ajp13

### Load balancer for AJP13 ###
worker.ajp13.lbfactor=1

worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp12, ajp13
worker.inprocess.type=jni
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)classes
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)jaxp.jar
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)parser.jar
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)jasper.jar
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)servlet.jar
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)webserver.jar
worker.inprocess.class_path=$(workers.java_home)$(ps)lib$(ps)tools.jar
worker.inprocess.cmd_line=-config
worker.inprocess.cmd_line=$(workers.tomcat_home)/conf/jni_server.xml
worker.inprocess.cmd_line=-home
worker.inprocess.cmd_line=$(workers.tomcat_home)
worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(p
s)jvm.dll
worker.inprocess.stdout=$(workers.tomcat_home)$(ps)inprocess.stdout
worker.inprocess.stderr=$(workers.tomcat_home)$(ps)inprocess.stderr
worker.inprocess.sysprops=tomcat.home=$(workers.tomcat_home)


And finally my include in httpd.conf file looks like this:

# Mod_Jk / Tomcat 4.1.17 Directives
LoadModule    jk_module modules/mod_jk-eapi.so
AddModule     mod_jk.c
JkWorkersFile /etc/httpd/conf/workers.properties
JkLogFile     logs/mod_jk.log
JkLogLevel    info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

##### Tomcat 4 Virtual Hosts begin here #####

<VirtualHost *>
  ServerAdmin rohit@translogicsys.com
  DocumentRoot /var/www/tomcat-apps/test1
  ServerName  test1-t4
  ErrorLog logs/test1-t4_error_log
  TransferLog logs/test1-t4_access_log
  ScriptAlias /cgi-bin/ /var/www/tomcat-apps/test1/cgi-bin/
  JkMount /*.jsp test1
  UserDir disabled
</VirtualHost>

<VirtualHost *>
  ServerAdmin rohit@translogicsys.com
  DocumentRoot /var/www/tomcat-apps/test2
  ServerName  test2-t4
  ErrorLog logs/test2-t4_error_log
  TransferLog logs/test2-t4_access_log
  ScriptAlias /cgi-bin/ /var/www/tomcat-apps/test2/cgi-bin/
  JkMount /*.jsp test2
  UserDir disabled
</VirtualHost>

And finally, finally my actual problem:

After starting tomcat and apache, when I try to access my application
http://test1-t4 or http://test2-t4 I get error from tomcat saying that "No
context
is defined to serve this request". Where could I have gone wrong?

Thanks again!

Rohit



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org