You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by kenneth topp <ca...@prodigy.net> on 2000/11/03 00:00:57 UTC

[tomcat-user] Re: Request for clarification - I.E. Tomcat mod_jk installed in Apache

You haven't configured apache to talk to tomcat.

You are free to have tomcat respond to http requests directly.  just
change the port from 8080 to 80 in server.xml.

Some reasons that you want to keep apache around are better http
conformance (I'm pretty sure), faster for static files (images/html), more
standard logging, legacy code (php/.htacces/whatever).

If you want to glue apache to tomcat, you need to configure a modules
(mod_jserv or mod_jk) and configure apache to forward request to tomcat
(vi ajp12/ajp13) or use a proxy from apache to tomcat.  The modules are
recommended.

There are serveral documents explaining this...

Good Luck,

Kenneth Topp
---
 to unsubscribe: tomcat-user-unsubscribe@jakarta.apache.org
 for more info: http://jakarta.apache.org/getinvolved/mail.html

On Thu, 2 Nov 2000, John Bateman wrote:

> Hi
> 
> I've installed the mod_jk module into Apache, everything 'seems' to work
> fine. I've also configured a new App called "Servlets" just to test stuff.
> 
> When I issue
> http://serverIP/Servlets/servlet/SampleCode
> 
> The server says "404 cannot find file" and the logs claim "Cannot find file
> /path_to_this_context/Servlets/servlet/SampleCode
> 
> When I issue:
> http://serverIP:8080/Servlets/servlet/SampleCode
> 
> The Servlet runs fine.
> 
> Why would I need to put the module 'inside' apache, if I'm required to run
> Tomcat as a process AND access my servlets on another port? Can I not just
> run it all off Tomcat standalone? I understand that Apache is more
> 'configurable' and handles static content better, but, I don't understand
> why I would add Tomcat into apache if I just access the same URL as I would
> if it was stand alone. Could I not get the same results leaving NOTHING
> extra inside Apache and referencing my Servlet files on the 8080 port (as
> tomcat stand alone)?
> 
> Hope this wasn't too confusing.
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> John Bateman
> Cyber World Group Inc.
> 
> 


RE: [tomcat-user] Re: Request for clarification - I.E. Tomcat mod_jkinstalled in Apache

Posted by John Bateman <jo...@cyberworldgroup.com>.
Hi

I seem to be having a problem with the documents. I've read the mod_jk HOW
TO, Tomcat UG and the workers.properties Document.

I seem to be under the understanding that I DO have Tomcat configured to
talk to apache, it just may not be doing it very well. :)

I've added the following lines in httpd.conf

# Tomcat module
LoadModule jk_module    modules/mod_jk.so

# Tomcat module
AddModule mod_jk.c

and finally

Include /usr/local/tomcat/conf/mod_jk.conf-aut

I've checked the configuraton file (mod_jk.conf-auto)

#
# The following line instructs Apache to load the jk module
#
LoadModule jk_module libexec/mod_jk.so

JkWorkersFile /usr/local/tomcat/conf/workers.properties
JkLogFile /var/log/httpd/apache-tomcat.log

#
# Log level to be used by mod_jk
#
JkLogLevel error

Plus, I've got the /Servlets context installed in the above file also.

#########################################################
# Auto configuration for the /Servlets context starts.
#########################################################

#
# The following line makes apache aware of the location of the /Servlets
context
#
Alias /Servlets "/home/john/public_html/Servlets"
<Directory "/home/john/public_html/Servlets">
    Options Indexes FollowSymLinks
</Directory>

#
# The following line mounts all JSP files and the /servlet/ uri to tomcat
#
JkMount /Servlets/servlet/* ajp12
JkMount /Servlets/*.jsp ajp12

#
# The following line prohibits users from directly accessing WEB-INF
#
<Location "/Servlets/WEB-INF/">
    AllowOverride None
    deny from all
</Location>

#
# The following line prohibits users from directly accessing META-INF
#
<Location "/Servlets/META-INF/">
    AllowOverride None
    deny from all
</Location>

#######################################################
# Auto configuration for the /Servlets context ends.
#######################################################

Am I potentially missing something here?

Oh yeah, I restarted BOTH apache and tomcat after the install/configuration
with Tomcat starting up first as instructed. After all this I I get the
aforementioned problems.

I also have support/references in the server.xml file for both the Apache
apjv12 (on port 8007) and apjv13 (on port 8009) protocols.

I also was hoping that the 'talking' between Apache and Tomcat would be
seamless maybe this is just not possible with it's current implementation?

Thank you very much for your response.


> -----Original Message-----
> From: kenneth topp [mailto:caught@prodigy.net]
> Sent: Thursday, November 02, 2000 6:01 PM
> To: John Bateman
> Cc: Tomcat-User (E-mail)
> Subject: [tomcat-user] Re: Request for clarification - I.E. Tomcat
> mod_jkinstalled in Apache
>
>
>
> You haven't configured apache to talk to tomcat.
>