You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Nick Holloway <Ni...@pyrites.org.uk> on 2001/02/15 10:12:47 UTC

Restart Apache and Tomcat with mod_jk?

In the "Tomcat-Apache HOWTO" distributed with Tomcat 3.2.1, there is
the following in the common questions:

    mod_jk - Apache locks up when requesting a Servlet or JSP 
	  mod_jk reuses the same port when talking to Tomcat, unlike
	  mod_jserv.  You'll need to restart Apache whenever you restart
	  Tomcat.

However, I haven't found it necessary (Apache 1.3.12 on Win32).  Is this
information in the HOWTO out of date, or will I get caught out sometime?

-- 
 `O O'  | Nick.Holloway@pyrites.org.uk
// ^ \\ | http://www.pyrites.org.uk/

R: Help - stuck with mod_jk

Posted by Eugenio Ascoli-Bartoli <eu...@assioma.it>.
Thank you for your help; let me send the configuration snippets:
I just did this:
       <Context path="/examples"
                 docBase="webapps/examples"
                 crossContext="false"
                 debug="0"
                 reloadable="true" >
        </Context>

on server.xml, and
###################################################################

#
# Root context mounts for Tomcat
#
JkMount /*.jsp ajp13
JkMount /servlet/* ajp13

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

#
# The following line makes apache aware of the location of the /examples
context
#
Alias /examples "/var/tomcat/webapps/examples"
<Directory "/var/tomcat/webapps/examples">
    Options Indexes FollowSymLinks
</Directory>

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

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

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

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


this in the mod_jk configuration file that is included from httpd.conf (and
I know that it is included, 'cos apache tells me that mod_jk is loaded).
When I try to execute .jsp pages, the external effect is the page been
displayed "as is" (not interpreted from tomcat). In the mod_jk log appear
these two lines:
[jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker
[jk_uri_worker_map.c (406)]: jk_uri_worker_map_t::map_uri_to_worker, Found a
match ajp13
 when I try to execute a servlet, the external effect is an "Error 404". In
the mod_jk log appear these two lines:
[jk_uri_worker_map.c (344)]: Into jk_uri_worker_map_t::map_uri_to_worker
[jk_uri_worker_map.c (434)]: jk_uri_worker_map_t::map_uri_to_worker, done
without a match

Let me say again that Tomcat is working well as standalone, and tha I can
also contact it on both 8007 and 8009 ports. I first start Tomcat, the I
start Apache.
Both come up and work.
Thank you very much.


To: <to...@jakarta.apache.org>
Sent: Thursday, February 15, 2001 4:01 PM
Subject: Re: Help - stuck with mod_jk


> My guess;  without seeing any of your configuration, is that you have not
> made the appropriate changes to your server.xml file.
> i.e.
>         <Context path="/myApps/"
>                  docBase="/home/httpd/html/myApps"
>                  crossContext="true"
>                  debug="0"
>                  reloadable="true"
>                  trusted="false" >
>         </Context>
>
> And / Or you have not made the appropriate changes to your httpd.conf file
> i.e.
> #########################################################
> # Configuration for the /myApps context starts.
> #########################################################
> #
> # The following line makes apache aware of the location of the /ai context
> #
> Alias /apps/helpdesk "/home/httpd/html/myApps"
> <Directory "/home/httpd/html/myApps">
>     Options Indexes FollowSymLinks
> </Directory>
>
> #
> # The following line mounts all JSP files and the /servlet/ uri to tomcat
> #
> JkMount /myApps/servlet/* ajp13
> JkMount /myApps/*.jsp ajp13
>
>
> #
> # The following line prohibits users from directly accessing WEB-INF
> #
> <Location "/myApps/WEB-INF/">
>     AllowOverride None
>     deny from all
> </Location>
>
> #
> # The following line prohibits users from directly accessing META-INF
> #
> <Location "/myApps/META-INF/">
>     AllowOverride None
>     deny from all
> </Location>
>
> #######################################################
> # Configuration for the /myApps context ends.
> #######################################################
>
>
>
> On Thu, 15 Feb 2001, you wrote:
> > I am new to the list, and I am sorry for posting the same question
twice,
> > but I am still stuck with Apache and Tomcat (using mod_jk).
> > I used the instructions in mod_jk.howto. I read both manual and
> > Tomcat-Apache HOWTO, but all the stuff related to mod_jk is in the howto
> > mentioned above.
> > Tomcat is up and running as standalone; Apache is up and running.
> > Configuration for mod_jk is used,mod_jk is loaded and working as I can
see
> > from the log file, mod_jk tries to find workers in workers.properties,
but
> > each request for virtual directories reserved to Tomcat never comes to
the
> > tomcat engine, as there is no communication on port 8009.
> > Any hint would be helpful. Excuse me again and TIA.
> > Eugenio Ascoli-Bartoli
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, email: tomcat-user-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org
>


Re: Help - stuck with mod_jk

Posted by Rick Roberts <to...@ait-web.com>.
My guess;  without seeing any of your configuration, is that you have not 
made the appropriate changes to your server.xml file.
i.e.
        <Context path="/myApps/"
                 docBase="/home/httpd/html/myApps" 
                 crossContext="true"
                 debug="0" 
                 reloadable="true" 
                 trusted="false" > 
        </Context>

And / Or you have not made the appropriate changes to your httpd.conf file
i.e.
#########################################################
# Configuration for the /myApps context starts.
#########################################################
#
# The following line makes apache aware of the location of the /ai context
#
Alias /apps/helpdesk "/home/httpd/html/myApps"
<Directory "/home/httpd/html/myApps">
    Options Indexes FollowSymLinks
</Directory>

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


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

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

#######################################################
# Configuration for the /myApps context ends.
#######################################################



On Thu, 15 Feb 2001, you wrote:
> I am new to the list, and I am sorry for posting the same question twice,
> but I am still stuck with Apache and Tomcat (using mod_jk).
> I used the instructions in mod_jk.howto. I read both manual and
> Tomcat-Apache HOWTO, but all the stuff related to mod_jk is in the howto
> mentioned above.
> Tomcat is up and running as standalone; Apache is up and running.
> Configuration for mod_jk is used,mod_jk is loaded and working as I can see
> from the log file, mod_jk tries to find workers in workers.properties, but
> each request for virtual directories reserved to Tomcat never comes to the
> tomcat engine, as there is no communication on port 8009.
> Any hint would be helpful. Excuse me again and TIA.
> Eugenio Ascoli-Bartoli
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org

Help - stuck with mod_jk

Posted by Eugenio Ascoli-Bartoli <eu...@assioma.it>.
I am new to the list, and I am sorry for posting the same question twice,
but I am still stuck with Apache and Tomcat (using mod_jk).
I used the instructions in mod_jk.howto. I read both manual and
Tomcat-Apache HOWTO, but all the stuff related to mod_jk is in the howto
mentioned above.
Tomcat is up and running as standalone; Apache is up and running.
Configuration for mod_jk is used,mod_jk is loaded and working as I can see
from the log file, mod_jk tries to find workers in workers.properties, but
each request for virtual directories reserved to Tomcat never comes to the
tomcat engine, as there is no communication on port 8009.
Any hint would be helpful. Excuse me again and TIA.
Eugenio Ascoli-Bartoli