tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "tpickard@crossref.org" <tpick...@crossref.org>
Subject RE: Mod_jk + Apache on RHEL3 gives 503 for jsp only
Date Tue, 11 Oct 2005 20:12:29 GMT

To answer some questions below:

Perfectly means it is our production tomcat server.  It performs all the
functions required and is accessed from the legacy webserver.

Getting images from the path http://webserver/PI/image.png.  We have no
direct access linked to tomcat instances on the their ports.

The Tomcat and Webserver will be on the same server.  

JkShmFile seems to be for unix installs where this resides on RedHat
Linux EL3.  I can add it if it is required for linux.

Jkmount directives are not "new" but from a 4.1.24 Tomcat and Jk_mod
that was upgraded.  I will make the changes to be consistent with the
deployed version of Tomcat.

I have 4 workers setup.  1 points to a running 4.1.24 tomcat supporting
an application to be replaced soon I hope.  1 to a separate port on the
4.12.24 tomcat server for one specific application because I was asked
to set it up that way.  1 to the current production tomcat server.  And
one that is for testing and uses the same settings as the production but
I can edit and change as I need to make things work.

I am a bit frustrated as I have not done much to make things "break."  I
copied the config files and edited the httpd.conf to be consistent with
the legacy install.  This is the only part that does not work.

"If Apache's DocumentRoot does not correspond to Tomcat's appBase, then
any static files contained in the application will not be served by
Apache without some more Apache configuration changes."  Can you give me
an example of this?

-----Original Message-----
From: Mark Eggers [mailto:its_toasted@yahoo.com]
Sent: Thursday, October 06, 2005 10:54 PM
To: Tomcat Users List
Subject: Re: Mod_jk + Apache on RHEL3 gives 503 for jsp only


--- "tpickard@crossref.org" <tpickard@crossref.org>
wrote:

> I have jakarta-tomcat-5.5.9 installed and working
> properly on the new
> server.  It is perfectly accessible from the legacy
> web server.

By perfectly accessible you mean . . . ?
 
> The main page, home.jsp, loads fine in the servlet
> if no page is given.
> http://webserver/PI/  The home.jsp spawns a 503 if
> is in the URL.
> http://webserver/PI/home.jsp   I can successfully
> get images from the
> page from the tomcat instance.  It does not like the
> .jsp extension.

By successfully getting images, do you mean:

http://webserver/PI/image.png

or

http://tomcatserver:8080/PI/image.png

> I have watched in Ethereal as no traffic goes from
> the apache to the
> tomcat.
> I have tried using the loopback and local network
> address.

Why?  Is this Tomcat instance on the same server?

> 
> #INSERT OF TOMCAT CONF PARAMETERS
> # Load mod_jk module
> # LoadModule jk_module modules/mod_jk.so
> LoadModule jk_module /etc/httpd/modules/mod_jk.so
> 
> # Declare the module for <IfModule directive>
> #AddModule mod_jk.c
> 
> # Where to find workers.properties
> JkWorkersFile /etc/httpd/conf/workers.properties
> 
> # Where to put jk logs
> JkLogFile /var/log/httpd/mod_jk.log
> 
> # Set the jk log level [debug/error/info]
> JkLogLevel debug
> 
> # Select the log format
> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> 
> # JkOptions indicate to send SSL KEY SIZE,
> JkOptions +ForwardKeySize +ForwardURICompat
> -ForwardDirectories
> 
> # JkRequestLogFormat set the request format
> JkRequestLogFormat "%w %V %T"
> 

I don't see the specification for JkShmFile

> # Send servlet for context /examples to worker named
> worker1
> JkMount /examples/servlet/* worker1

The above should be:

JkMount /servlets-examples/servlet/* worker1

> JkMount /PI/* worker3
> #JkMount /PI/*.jsp worker3

Why are you using worker3 here?

> # Send JSPs for context /examples to worker named
> worker1
> JkMount /examples/*.jsp worker1

The above shoould be /jsp-examples/*.jsp worker1

> JkMount /journals/*.jsp worker1
> 
> Worker Properties
> /etc/httpd/conf/workers.properties
> # Define some properties
> workers.apache_log=/var/log/httpd/
>
workers.tomcat_home=/usr/local/tomcat/jakarta-tomcat-5.5.9
> workers.java_home=/usr/bin/java
> ps=/
> 
> #
> worker.list=worker1
> 

According to the documentation this should contain a
comma separated list of all the workers.  However, if
you're going to the same Tomcat instance all the time,
you'll only need one worker definition

> # Set properties for worker1 (ajp13)
> worker.worker1.type=ajp13
> worker.worker1.host=172.20.1.19
> worker.worker1.port=8009
> 

First of all, there should only be one worker list. 
Second of all, why do you have multiple workers going
to the same host but different ports?  Do you have
multiple Tomcats running on this host?

> #
> worker.list=worker2
> 
> # Set properties for worker2 (ajp13)
> worker.worker2.type=ajp13
> worker.worker2.host=172.20.1.19
> worker.worker2.port=10009
> 
> #
> worker.list=worker3
> 
> # Set properties for worker3 (ajp13)
> worker.worker3.type=ajp13
> worker.worker3.host=127.0.0.1
> worker.worker3.port=8099
> 
> #
> worker.list=worker4
> 
> # Set properties for worker4 (ajp13)
> worker.worker4.type=ajp13
> worker.worker4.host=172.20.1.19
> worker.worker4.port=8099

Even after all that is done, there are some other
issues when connecting Apache httpd and Tomcat.  If
Apache's DocumentRoot does not correspond to Tomcat's
appBase, then any static files contained in the
application will not be served by Apache without some
more Apache configuration changes.

There are several ways of accomplishing this, using
the Directory directive and Aliases or JkAutoAlias in
Apache's httpd.conf.

/mde/


		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.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


Mime
View raw message