Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mod_jk setup help. Tomcat 5 + Apache2

Status
Not open for further replies.

Jongr67

Programmer
Oct 27, 2005
3
0
0
US
Im trying to set up connector mod_jk 1.2.14 for my Apache 2.0.54 web server to connect to tomcat 5.5. I used the auto config mode of tomcat to generate the mod_jk.conf file and im having trouble executing my scripts. Seems like everthing is being forwarded to tomcat, so I can access the index files but when executing the examples I get a 500 internal error.

Steps I have used so far.
1. install mod_jk module within modules folder of apache

2. server.xml Added under <Server port="8005" shutdown="SHUTDOWN">

<Listener className="org.apache.jk.config.ApacheConfig" modJk="C:/Program Files/Apache Group/Apache2/modules/mod_jk.so" />

3.server.xml Added under <Host> section
<Listener className="org.apache.jk.config.ApacheConfig" append="true" forwardAll="false" modJk="C:/Program Files/Apache Group/Apache2/modules/mod_jk.so" />

4.added to jk folder worker.properties
# 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.reclycle_timeout=300

5.added to apache http.conf
LoadModule jk_module modules/mod_jk.so
&
Include "C:/Program Files/Apache Software Foundation/Tomcat 5.5/conf/auto/mod_jk.conf"

Not sure where I went wrong could have missed something. I can execute servelets/JSPs just fine through localhost:8080 but going through port 80 I get internal error.
Help is appreciated =)

 
Don't know whats wrong in your case but here is my configs ( tomcat-5.0.28 ):

---httpd.conf---
<IfModule !mod_jk.c>
LoadModule jk_module "modules/mod_jk.so"
</IfModule>

JkWorkersFile "conf/workers.properties"
JkLogFile "logs/mod_jk.log"

JkLogLevel info
JkMount /servlets-examples/* worker1

---workers.properties---
worker.list=worker1
worker.worker1.port=8009
worker.worker1.host=aleksej
worker.worker1.type=ajp13
worker.worker1.socket_keepalive= 120

---server.xml---
<Service name="Catalina">
...
<Connector port="8009"
enableLookups="false"
redirectPort="8443"
debug="0"
protocol="AJP/1.3"
/>
...

 
Thanks alot. Not sure what was wrong I did a fresh install of tomcat in a different directory using the same config and it worked fine.
 
OK I found the problem it has to do with my worker.properties file when I include it I can't execute my scripts through apache without it, it works fine. However, I cant access tomcat at all through apache when using my DNS or my local lan ip.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top