You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by David Godfrey <da...@misys.com> on 2003/03/04 17:36:17 UTC

Problems configuring Tomcat with Apache using mod_jk2

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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Problems configuring Tomcat with Apache using mod_jk2

Posted by Ben Ricker <br...@wellinx.com>.
On Tue, 2003-03-04 at 10:36, Ben Ricker wrote:
> 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.

Let me correct that: it should be '/examples/* blah'. I was looking at
two different entries in my own httpd.conf.

Ben Ricker

> 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: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
-- 
Ben Ricker <br...@wellinx.com>
Wellinx.com


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


RE: Problems configuring Tomcat with Apache using mod_jk2

Posted by apachep2 <ap...@hotmail.com>.
David,

I am confused. You said you use jk2. But in your log, I can only see
mod_jk resuming normal operations while it should be mod_jk2/2.0.3-dev
configured -- resume...... if you use jk2.

-----Original Message-----
From: Ben Ricker [mailto:bricker@wellinx.com] 
Sent: March 4, 2003 11:37 AM
To: 'tomcat-user@jakarta.apache.org'
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: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
-- 
Ben Ricker <br...@wellinx.com>
Wellinx.com


---------------------------------------------------------------------
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


Re: Problems configuring Tomcat with Apache using mod_jk2

Posted by Mark Eggers <it...@yahoo.com>.
Actually, mod_jk2 does not use JKMount . . . .

In workers2.properties you might have a configuration
that reads:

# Uri mapping
[uri:/examples/*.jsp]
worker=ajp13:localhost:8009

Now this is really pointing to:

$TOMCAT_HOME/webapps/examples

Most of the time, the absolute directory is outside of
your document home for the Apache web server.

You can handle this with a directory alias in the
httpd.conf file.  Something like:

Alias /examples/ "/opt/tomcat/webapps/examples/"

will work.  Just substitute your directory location
for the one in the above line.

These two snippets (from workers2.properties and
httpd.conf) will let Apache serve everything except
the files ending in .jsp.  That will be handed off to
Tomcat.

To include the servlets under the examples directory,
add the following to your workers2.properties file.

[uri:/examples/servlet/*]
worker=ajp13:localhost:8009

This will get all of the servlets in the examples
webapp, while still allowing Apache to serve static
content.

There are some more configuration changes that you
should do, like denying access to the WEB-INF
directory, and configuring the properties of the
actual application directory.  Most of that is
detailed in the Apache web server documentation.

I'm just a user/sysadmin/developer and not a member of
any Apache group, so this is just based on my
experience and the reading of the documentation.

HTH

/mde/
just my two cents . . . .

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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


Re: Problems configuring Tomcat with Apache using mod_jk2

Posted by Ben Ricker <br...@wellinx.com>.
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: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
-- 
Ben Ricker <br...@wellinx.com>
Wellinx.com


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


RE: Problems configuring Tomcat with Apache using mod_jk2

Posted by apachep2 <ap...@hotmail.com>.
Can you search archive? My bet is you didn't define [uri] in your
workers2.properties.

-----Original Message-----
From: David Godfrey [mailto:david.godfrey@misys.com] 
Sent: March 4, 2003 11:36 AM
To: 'tomcat-user@jakarta.apache.org'
Subject: Problems configuring Tomcat with Apache using mod_jk2 

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: 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