tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <>
Subject Re: Problem connecting Tomcat to Apache using mod_jk
Date Tue, 01 Jul 2008 10:20:33 GMT
Hi Laurence,

Laurence Samuels schrieb:
> JkWorkersFile "/usr/local/apache2/"
> JkLogFile "/usr/local/apache-tomcat-5.5.17/logs/mod_jk.log"
> JkMountFile "/usr/local/apache2/"
> JkLogLevel debug

And you get plenty of startup messages in your JkLogFile including one, 
that says mod_jk/1.2.26 initialized?

> <VirtualHost x.x.x.x:80>   (using localhost here gave the same results)
>     ServerName      (using localhost here gave the same results)

Either move your JkMountFile here (into the VirtualHost), or if you want 
to use the same rules in several VirtualHosts, include "JkMountCopy on" 
in the VirtualHosts (or if you want to have the same rules in all 
VirtualHosts, set "JkMountCopy all" in the global server, e.g. where you 
have your JkWorkersFile).

That should do the trick.

See other comments below.

> Alias /AuditOnlineV2_Attendance
> "/usr/local/tomcat/webapps/AuditOnlineV2_Attendance/"
>    <Directory "/usr/local/tomcat/webapps/AuditOnlineV2_Attendance">
>          Options FollowSymLinks
>          AllowOverride None
>          Allow from all
>          DirectoryIndex index.jsp
>    </Directory>
> Alias /webapps "/usr/local/tomcat/webapps/"
> <Directory "/usr/local/tomcat/webapps">
>          Options FollowSymLinks
>          AllowOverride None
>          Allow from all
>          DirectoryIndex index.jsp
>    </Directory>
> </VirtualHost>

If you want to forward any request for webapps and for 
AuditOnlineV2_Attendance to Tomcat, you can remove the Alias and 
Directory directives.

> E.
> The contents of /usr/local/apache2/ :
> workers.tomcat_home=/usr/local/tomcat
> workers.java_home=/usr/bin/java
> ps=/

Throw away the above three lines.

> worker.list=worker1
> worker.worker1.port=8009
> worker.worker1.type=ajp13
> worker.worker1.lbfactor=1
> F.
> The contents of /usr/local/apache2/ :
> /=worker1
> /*=worker1
> /*.jsp=worker1

The middle lines functionally includes the other two.

> /webapps=worker1
> /webapps/*=worker1

There is a little syntactic trick to combine the two:


> /AuditOnlineV2_Attendance=worker1
> /AuditOnlineV2_Attendance/*=worker1

If you like, you can use again:


The webapps rule and the rule for AuditOnlineV2_Attendance is already 
implied by the above /*, which forwards anything.

> H.
>  I started tomcat as user tomcat. I started apache2 as root.  Then I went to
> as the server.  What I got was the directory listing of that
> directory. Clicking on AuditOnlineV2_Attendance/ got me to the directory
> listing for AuditOnlineV2_Attendance/, and clicking on the index.jsp in that
> directory came up with the jsp code of that file.
> I was expecting to see the graphics, etc of the actual site. 
> I've been on this problem for over 3 days. Pls help.

Mount definitions are local to virtual hosts. If you want to use them 
inside a VirtualHost, put them in there, or use JkMountCopy.



To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message