On Tue, 2003-03-04 at 11:01, David Godfrey wrote: > >It would help if you post the entries you added in httpd.conf for Tomcat. > Also include your server.xml file for more information. > > I have modified httpd.conf as follows: > > JKWorkersFile "/opt/tomcat/conf/jk/workers.properties" > JKLogFile "/opt/tomcat/logs/mod)jk.log" > Include /opt/tomcat/conf/auto/mod_jk.conf
Just to be sure, tack on the mod_jk.conf. It still looks like you have an issue with telling Apache where to go for /examples and any other webapps (like /manager or /admin). You need to add the JkMount directives in httpd.conf; they are sort of like redirects in that they tell Apache to send requests for, say, /examples/* to the available worker(s). My entry in httpd.conf for /examples: JkMount /examples/* loadbalancer "loadbalancer" is defined in my workers.properties file. For example, I have the follwoing in my workers.properties: worker.list=tomcat1,tomcat2,loadbalancer # ------------------------ # First tomcat server # ------------------------ worker.tomcat1.port=11009 worker.tomcat1.host=127.0.0.1 worker.tomcat1.type=ajp13 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=tomcat1,tomcat2 Ben Ricker > Server.xml is as follows (standard apart from the references to mod_jk) > > <Server port="8005" shutdown="SHUTDOWN" debug="0"> > <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" > modJk="/opt/apache/modules/mod_jk-2.0.43.so" /> > <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" > debug="0"/> > <Listener > className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" > debug="0"/> > <GlobalNamingResources> > <Environment name="simpleValue" type="java.lang.Integer" value="30"/> > <Resource name="UserDatabase" auth="Container" > type="org.apache.catalina.UserDatabase" > description="User database that can be updated and saved"> > </Resource> > <ResourceParams name="UserDatabase"> > <parameter> > <name>factory</name> > <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value> > </parameter> > <parameter> > <name>pathname</name> > <value>conf/tomcat-users.xml</value> > </parameter> > </ResourceParams> > </GlobalNamingResources> > <Service name="Tomcat-Standalone"> > <Connector className="org.apache.coyote.tomcat4.CoyoteConnector" > port="8080" minProcessors="5" maxProcessors="75" > enableLookups="true" redirectPort="8443" > acceptCount="100" debug="0" connectionTimeout="20000" > useURIValidationHack="false" disableUploadTimeout="true" /> > <!-- Define the default virtual host --> > <Host name="localhost" debug="0" appBase="webapps" > unpackWARs="true" autoDeploy="true"> > <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" > append="true" forwardAll="false" > modJk="/opt/apache/modules/mod_jk-2.0.43.so" /> > <Logger className="org.apache.catalina.logger.FileLogger" > directory="logs" prefix="localhost_log." suffix=".txt" > timestamp="true"/> > <Context path="/examples" docBase="examples" debug="0" > reloadable="true" crossContext="true"> > <Logger className="org.apache.catalina.logger.FileLogger" > prefix="localhost_examples_log." suffix=".txt" > timestamp="true"/> > <Ejb name="ejb/EmplRecord" type="Entity" > home="com.wombat.empl.EmployeeRecordHome" > remote="com.wombat.empl.EmployeeRecord"/> > <Environment name="maxExemptions" type="java.lang.Integer" > value="15"/> > <Parameter name="context.param.name" value="context.param.value" > override="false"/> > <Resource name="jdbc/EmployeeAppDb" auth="SERVLET" > type="javax.sql.DataSource"/> > <ResourceParams name="jdbc/EmployeeAppDb"> > <parameter><name>username</name><value>sa</value></parameter> > <parameter><name>password</name><value></value></parameter> > <parameter><name>driverClassName</name> > <value>org.hsql.jdbcDriver</value></parameter> > <parameter><name>url</name> > <value>jdbc:HypersonicSQL:database</value></parameter> > </ResourceParams> > <Resource name="mail/Session" auth="Container" > type="javax.mail.Session"/> > <ResourceParams name="mail/Session"> > <parameter> > <name>mail.smtp.host</name> > <value>localhost</value> > </parameter> > </ResourceParams> > <ResourceLink name="linkToGlobalResource" > global="simpleValue" > type="java.lang.Integer"/> > </Context> > </Host> > </Engine> > </Service> > </Server> > > > Many thanks, > > David > > > > > > -----Original Message----- > From: Ben Ricker [mailto:[EMAIL PROTECTED] > Sent: 04 March 2003 16:37 > To: '[EMAIL PROTECTED]' > Subject: Re: Problems configuring Tomcat with Apache using mod_jk2 > > > You need to JkMount the /examples in httpd.conf. Something like "JkMount > */examples blah" where "blah" is the name of your loadbalancer setup in > workers.properties. > > It would help if you post the entries you added in httpd.conf for Tomcat. > Also include your server.xml file for more information. > > Ben Ricker > > On Tue, 2003-03-04 at 10:36, David Godfrey wrote: > > Hi, > > > > I'm having problems when trying to use Tomcat and Apache HTTP server > > together, with mod_jk2. I have built Apache from the source, installed > > Tomcat 4.1.18, and tested each individually (they seem to function > > correctly). When I add in mod_jk2, both Apache and Tomcat still start > > and function correctly, but there does not appear to be any > > redirection taking place, (I can access http://localhost:8080/examples > > for, but not http://localhost/examples). > > > > When I examine "error_log" in APACHE_HOME/logs, there are the > > following 2 entries, but nothing that (to me) indicates an error: > > > > Apache/2.0.43 (Unix) mod_jk/1.2.1 configured -- resuming normal > > operations > > > > File does not exist: /opt/apache/htdocs/examples > > > > The error/log file I have defined in httpd.conf for mod_jk2 is created > > when I start Apache / Tomcat, but is empty. I am running Solaris 2.8, > > Apache 2.0.43, Tomcat 4.1.18, and Java 1.4.1. > > > > I would really appreciate some ideas on how I could solve this > > problem. > > > > Many thanks, > > > > D > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] -- Ben Ricker <[EMAIL PROTECTED]> Wellinx.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
