• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Apache 1.3 / Tomcat 4.0 Configuration Problem

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess i should have mentioned in the title that i'm trying to use mod_jk.
For the last few weeks I've been wrestling with trying to get tomcat and apache working together. I'm trying to set it up to where I have one Tomcat and one Apache running with virtual hosts. Right now i'm only testing with two sites.
When I load my primary site (the "default" one in apache), everything works prefectly. However, the secondary site can run web applications, and serve static html, but gives me "resource unavailable" when i try to load any *.jsp that is in the second site, but not in a web application.
Here are sippets from my configuration files.
server.xml:
<Server port="8005" shutdown="SHUTDOWN" debug="0">
<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" />
<Service name="Tomcat-Standalone">
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector className="org.apache.catalina.connector.http.HttpConnector"
port="8080" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" connectionTimeout="60000"/>
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
port="8009" minProcessors="5" maxProcessors="75"
acceptCount="10" debug="0"/>
<Engine name="Standalone" defaultHost="localhost" debug="0">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="catalina_log." suffix=".txt"
timestamp="true"/>
<Realm className="org.apache.catalina.realm.MemoryRealm" />
<Host name="www.host1.com" debug="0" appBase="webapps" unpackWARs="true">
<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" append="true" />
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="common"/>
<Logger className="org.apache.catalina.logger.FileLogger" directory="logs" prefix="localhost_log." suffix=".txt" timestamp="true"/>
<Context path="" docBase="/webs/site1" debug="0" />
<Context path="/app1" docBase="app1" debug="0" reloadable="true" />
<Context path="/app2" docBase="app2" debug="0" reloadable="true" />
</Host>
<Host name="www.host2.com" debug="0" appBase="webapps" unpackWARs="true">
<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" append="true" />
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="common" />
<Logger className="org.apache.catalina.logger.FileLogger" directory="logs" prefix="localhost_log." suffix=".txt" timestamp="true" />
<Context path="" docBase="/webs/site2" debug="0" />
<Context path="/app1" docBase="app1" debug="0" reloadable="true" />
</Host>
</Engine>
</Service>
</Listener>
</Server>
and this is httpd.conf:
NameVirtualHost *
<IfModule !mod_jk.c>
LoadModule jk_module libexec/mod_jk.so
</IfModule>
JkMount /webfuse/adbuilder/* ajp13
JkMount /webfuse/*.jsp ajp13
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13

JkWorkersFile "/opt/tomcat/conf/jk/workers.properties"
JkLogFile "/opt/tomcat/logs/mod_jk.log"
JkLogLevel emerg
# host1.com Virtual Host.
#
<VirtualHost *>
ServerName www.host1.com
DocumentRoot /webs/site1
<Directory "/webs/site1">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
JkMount /app1 ajp13
JkMount /app1/* ajp13
JkMount /app2 ajp13
JkMount /app2/* ajp13

</VirtualHost>
# host2.com Virtual Host.
#
<VirtualHost *>
ServerName www.host2.com
DocumentRoot /webs/site2
<Directory "/webs/site2">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13
JkMount /app1 ajp13
JkMount /app1/* ajp13
</VirtualHost>

i know that the server.xml file is the "tomcat-standalone" section, but i started changing that and it turned into the connected part.
any help is greatly appreciated.
-chris
 
Chris Patton
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
nevermind. i figured it out. there was a malformed web.xml file in the default context of the secondary site. the log files weren't specific enough for me to see it at first glance. oh well. just remember that if you get a resource unavailable error... it's probably a problem with your web.xml.
 
Willie Smits increased rainfall 25% in three years by planting trees. Tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic