tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@comcast.net
Subject Re: Can't get apache to connect to tomcat
Date Sun, 21 Aug 2005 13:54:33 GMT
Adding to my previous post - this will (or should) load up the Tomcat Documentation that came
with your distribution.  Not the default TC homepage. . .


> Are you trying to mount the default TC homepage?
> I'm running Apache2 / Tomcat 5.5.9 on a Debian Sarge box and have successfully 
> (finally) gotten them to speak to each other.  Here's what's worked for me:
> 1) Everything in JK2.Properties is still commented out.
> 2) Added these lines to httpd.conf:
> JkAutoAlias /usr/share/jakarta-tomcat-5.5.9/webapps (change to your path)
> (If your using mod.ssl add the next 4)
> JkExtractSSL On
> JkHTTPSIndicator HTTPS
> JkSESSIONIndicator SSL_SESSION_ID
> JkCIPHERIndicator SSL_CIPHER
> JkWorkersFile /usr/share/apache2/conf/workers.properties (change to your path)
> JkLogFile /usr/share/apache2/logs/mod_jk.log (change to your path)
> JkLogLevel info
> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
> JkRequestLogFormat "%w %V %T"
> Alias /tomcat-docs /usr/share/jakarta-tomcat-5.5.9/webapps/tomcat-docs (change 
> to the path on your machine)
> <Location "/tomcat-docs/WEB-INF/">
>   AllowOverride None
>   deny from all
> </Location>
> JkMount /tomcat-docs/* worker1 (your worker name)
> (here's the cool part - have apache serve the static content )
> JkUnMount /tomcat-docs/*.png worker1 (your worker name)
> JkUnMount /tomcat-docs/*.jpg worker1 (your worker name)
> JkUnMount /tomcat-docs/*.gif worker1 (your worker name)
> JkUnMount /tomcat-docs/*.html worker1 (your worker name)
> 
> 
> 
> > 
> > I'm trying to get requests going to www.mydomain.com/servlets/ to get  
> > handed off to tomcat.
> > 
> > I have the mod_jk module loaded:
> > Apache/2.0.54 (Unix) mod_ssl/2.0.54 OpenSSL/0.9.7f mod_jk/1.2.14  
> > Server at www.mydomain.com Port 80
> > 
> > and I get the Tomcat/5.0.28 welcome screen when I go to:  
> > www.mydomain.com:8080
> > 
> > but I'm missing something in between.  I'm having a really hard time  
> > with all this, as I imagine many people do because of all of the  
> > components and the confusing version numbers.  For the longest time,  
> > I was trying to figure out where to get mod_jk2 because it sounded  
> > newer than mod_jk.  Silly me.  Even my "Professional Apache Tomcat 5"  
> > book from 2004 has examples using mod_jk2.  Anyway...
> > 
> > I have added only this to my httpd.conf:
> > LoadModule jk_module modules/mod_jk.so
> > 
> > I have this workers.properties file in my /usr/local/apache/conf:
> > # Define 1 real worker using ajp13
> > worker.list=worker1
> > # Set properties for worker1 (ajp13)
> > worker.worker1.type=ajp13
> > worker.worker1.host=localhost
> > worker.worker1.port=8009
> > worker.worker1.lbfactor=50
> > worker.worker1.cachesize=10
> > worker.worker1.cache_timeout=600
> > worker.worker1.socket_keepalive=1
> > worker.worker1.recycle_timeout=300
> > 
> > This is my jk2.properties file: (why is it called jk2?)
> > channelSocket.address=localhost
> > channelSocket.port=8009
> > channelSocket.serverTimeout=600
> > channelSocket.maxThreads=50
> > 
> > I have these lines uncommented in server.xml:
> >      <Connector port="8009"
> >                 enableLookups="false" redirectPort="8443" debug="0"
> >                 protocol="AJP/1.3" />
> > 
> > I know I need something to point /servlets/ or /servlets/* to a  
> > worker, but I'm not sure how to do that or where to put it.  I had  
> > something like:
> > 
> > JkMount /servlets/ worker1
> > 
> > in my httpd.conf, but that didn't work.  It actually gave me an ISE  
> > when I went to www.mydomain.com/servlets/ which was promising, but  
> > not what I wanted exactly.
> > 
> > I'd be most appreciative if someone could let me know if I'm even  
> > close and what else I need.
> > 
> > Thanks,
> > -Jon
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 

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


Mime
View raw message