File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Problems Linking Apache and Tomcat with mod_jk Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Problems Linking Apache and Tomcat with mod_jk" Watch "Problems Linking Apache and Tomcat with mod_jk" New topic
Author

Problems Linking Apache and Tomcat with mod_jk

Gabriel Fox
Ranch Hand

Joined: Oct 17, 2001
Posts: 170
Hello, i am having problems Linking Apache and Tomcat with mod_jk. i can only request for JSPs in Tomcat via Apache
using the localhost and not actual machine name, after finishing my set up, using Apache 2.0 and Tomcat 4.1.E.g. http://localhost:8088/webAppRoot/jsp/xyz.jsp, if i use the actual host name say
http://U608st23:8088/webAppRoot/jsp/xyz.jsp, it falls over.Where
webAppRoot/jsp/xyz.jsp resides on Tomcat.
But,http://U608st23:8088 works on Apache as a standalone , loading the Apache home page.
Note: Listen U608st23:8088 was added to the httpd.conf.
In my server.xml i had:
<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
append="true" />
Immediately following the <Server port="8005" ...> tag near the top of the file.

Then in <Tomcat-Home> /conf/jk/workers.properties has the following lines:
workers.tomcat_home=d:\<Tomcat-Home>
workers.java_home=$(JAVA_HOME)
workers.th=$(workers.tomcat_home)
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.th)$(ps)jre$(ps)bin$(ps)classic$(ps)jvm.dll
worker.inprocess.stdout=$(workers.th)$(ps)logs$(ps)inprocess.stdout
worker.inprocess.stderr=$(workers.th)$(ps)logs$(ps)inprocess.stderr
Please, help!!!
Note: I could request for all JSPs on Tomcat via Apache using localhost, but not actual machine name.
Simone Berg
Greenhorn

Joined: Oct 20, 2003
Posts: 2
I have the exact same problem. Everything works fine as long as I use localhost. If anyone knows a solution, it would be really appreciated.
Simone
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problems Linking Apache and Tomcat with mod_jk