Chris, Thanks much fo respond to my issues.
My problem occured when I tried to access Tomcat using more than two context. The traffic for port 80 will forward to Tomcat fine if I use only the ROOT context. In another word, it will only worked with ROOT and not with any other new context that I created. I want to mention that it worked with port 8080 for all three new instances. For instance: http://www.tticket.com:8080/tticket/index.jsp http://www.popmon.com:8080/tom/index.jsp http://www.tom.com:8080/popmon/index.jsp However, it will not work when I run these http://www.tticket.com/index.jsp http://www.popmon.com/index.jsp http://www.tom.com/index.jsp Again, it will work if I just use the default ROOT context. So, I know the mod_jk is working fine but only with the default ROOT context. Here are what I have under tomcat home directory: /app/webapps/tticket /app/webapps/popmon /app/webapps/tom The Apache doc home is under /www/tticket /www/popmon /www/tom Here are the files that I am currently using **** httpd.conf file ********************** <VirtualHost 192.168.0.227:80> ServerAdmin [EMAIL PROTECTED] ServerName www.tticket.com DocumentRoot /www/tticket ErrorLog /www/tticket/logs/error_log CustomLog /www/tticket/logs/access_log common JkMount /tticket/*.jsp worker1 JkMount /tticket/*.jspx worker1 JkMount /tticket/*.servlet worker1 JkMount /tticket/login* worker1 JkMount /tticket/servlet/* worker1 # Deny direct access to WEB-INF <LocationMatch ".*WEB-INF.*"> AllowOverride None deny from all </LocationMatch> </VirtualHost> #NameVirtualHost 192.168.0.228:80 <VirtualHost 192.168.0.228:80> ServerAdmin [EMAIL PROTECTED] ServerName support.popmon.com DocumentRoot /www/popmon ErrorLog /www/popmon/logs/error_log CustomLog /www/popmon/logs/access_log common JkMount /popmon/*.jsp worker2 JkMount /popmon/*.jspx worker2 JkMount /popmon/*.servlet worker2 JkMount /popmon/login* worker2 JkMount /popmon/servlet/* worker2 # Deny direct access to WEB-INF <LocationMatch ".*WEB-INF.*"> AllowOverride None deny from all </LocationMatch> </VirtualHost> <VirtualHost 192.168.0.229:80> ServerAdmin [EMAIL PROTECTED] ServerName www.tom.com DocumentRoot /www/tom ErrorLog /www/tom/logs/error_log CustomLog /www/tom/logs/access_log common JkMount /tom/*.jsp worker3 JkMount /tom/*.jspx worker3 JkMount /tom/*.servlet worker3 JkMount /tom/login* worker3 JkMount /tom/servlet/* worker3 # Deny direct access to WEB-INF <LocationMatch ".*WEB-INF.*"> AllowOverride None deny from all </LocationMatch> </VirtualHost> # Include conf/mod_jk.conf ******** end of httpd.conf file ********* **** mod_jk.conf file ***************** # Load mod_jk module LoadModule jk_module modules/mod_jk.so # Where to find workers.properties JkWorkersFile conf/workers.properties # Where to put jk logs JkLogFile logs/mod_jk.log # Set the jk log level [debug/error/info] #JkLogLevel info JkLogLevel debug # Select the log format JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " # JkOptions indicate to send SSL KEY SIZE, JkOptions +ForwardKeySize +ForwardURICompat - ForwardDirectories # JkRequestLogFormat set the request format JkRequestLogFormat "%w %V %T" # Send servlet for context /examples to worker named worker1 # JkMount /examples/servlet/* router # Send JSPs for context /examples to worker named worker1 # JkMount /examples/*.jsp router #JkMount /cluster-test/* router ***** end of mod_jk.conf file **************** *** workers.properties file ************ # workers.tomcat_home=/app/webapps # # workers.java_home should point to your Java installation. Normally # you should have a bin and lib directories beneath it. # workers.java_home=/usr/java/jdk1.5.0_07 # # You should configure your environment slash... ps=\ on NT and / on UNIX # and maybe something different elsewhere. # ps=/ #********************** # List workers worker.list=worker1,worker2,worker3 # # Define worker1 # workers.properties - ajp13 worker.worker1.port=8110 worker.worker1.host=192.168.0.227 worker.worker1.type=ajp13 worker.worker1.cachesize=100 worker.worker1.cache_timeout=60 worker.worker1.socket_keepalive=1 worker.worker1.socket_timeout=5 worker.worker1.recycle_timeout=30 # # Define worker2 # workers.properties - ajp13 worker.worker2.port=8111 worker.worker2.host=192.168.0.228 worker.worker2.type=ajp13 worker.worker2.cachesize=100 worker.worker2.cache_timeout=60 worker.worker2.socket_keepalive=1 worker.worker2.socket_timeout=5 worker.worker2.recycle_timeout=30 # # Define worker3 # workers.properties - ajp13 worker.worker3.port=8112 worker.worker3.host=192.168.0.229 worker.worker3.type=ajp13 worker.worker3.cachesize=100 worker.worker3.cache_timeout=60 worker.worker3.socket_keepalive=1 worker.worker3.socket_timeout=5 worker.worker3.recycle_timeout=30 *** end of workers.properties file ********* *** server.xml file ************ <!-- Define an AJP 1.3 Connector on port 8110 --> <Connector port="8110" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" /> <!-- Define an AJP 1.3 Connector on port 8111 --> <Connector port="8111" enableLookups="false" redirectPort="8444" protocol="AJP/1.3" /> <!-- Define an AJP 1.3 Connector on port 8112 --> <Connector port="8112" enableLookups="false" redirectPort="8445" protocol="AJP/1.3" /> <Host name="localhost" appBase="/app/webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> ***********end of server.xml *********************** Tom ---- Original message ---- >Date: Sun, 29 Oct 2006 07:54:15 -0500 >From: Christopher Schultz <> >Subject: Re: mod_jk and apache problem >To: Tomcat Users List <users@tomcat.apache.org> > >Tom, > >Tom Miller wrote: >> The following said that if client click on links that including *.jsp >> then forward the requested to tomcat using worker2. But where will >> it go when the traffic forward to tomcat. If one have more than one >> context under Tomcat. How does it know which one to go from the >> three. > >Each worker you have points to an instance of Tomcat (it can be more >complicated than that, but this is generally true). Based upon the >/path/ of the URI, Tomcat will choose the correct webapp. > >> JkMount /*.jsp worker2 > >If you have a webapp deployed into '/foo' and you access '/foo/bar.jsp', >then you will be sent to the 'foo' webapp. > >> Per your and other suggestion, I did this and it will give me error >> via the apache log. >> >> *** modified httpd.conf file **** >> JkMount /tticket/*.jsp worker2 > >So, you are expecting either a webapp called 'tticket' or you are using >the ROOT webapp and have a directory called 'tticket' in there. > >Can you give us more details about your deployment? > >-chris > >________________ >signature.asc (1k bytes) --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]