tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Turner <tomcat-u...@johnturner.com>
Subject Re: Invalid command 'JkMount'....
Date Mon, 02 Jun 2003 13:35:00 GMT

Your mod_jk module is only loaded if HAVE_JK = TRUE (or is defined).  In 
webmin, it probably is, when you start from the command line, it probably 
isn't.  To test, you would do something like:

export HAVE_JK=TRUE

on the command line, then start Apache and see what happens.

In any case, there's no need to be that complex.  Just load the 
module...there's no need to do a an "if" statement.  If you must do an "if" 
statement, don't check an arbitrary environment variable, check for 
mod_jk.c instead:

<IfModule !mod_jk.c>
LoadModule jk_module modules/mod_jk.so
</IfModule>

John

On Mon, 02 Jun 2003 14:04:37 +0100, Graham Smith <gms@ecs.soton.ac.uk> 
wrote:

> Hi.
>
> Yesterday I installed the mod_jk module into apache and managed to get it 
> configued and doing what I want it to do. The only problem I now have is 
> that whenever I start apache from the command line I get the error 
> message below.
>
> Invalid command 'JkMount', perhaps mis-spelled or defined by a module not 
> included in the server configuration
>
> To initially get the two (apache and tomcat) talking to each other I 
> followed the instructiosn that can be found here http://www.linux- 
> sxs.org/internet_serving/tomcat-apache.html
>
> Following these instructions I installed the rpm and everything seemed to 
> work fine. I modified the mod_jk.conf file and took a look at the 
> results. Since I had included a "JkMount /* ajp13" directive all requests 
> to apache were getting forwarded to tomcat. What I wanted was only 
> requests coming to a particular address to get forwarded to tomcat. In 
> other words I wanted to use virtual servers with only some sending 
> requests on. I removed the context I had put in the mod_jk.conf file and 
> instead defined a virtual server in apache and included the context in 
> there thus producing virtual server definition below (the hopefully 
> relevent parts of the httpd.conf file).
>
> What is strange about this problem is that I can start apache quite 
> happily using webmin but it won't start if I do "/etc/init.d/httpd start" 
> from a command prompt (I get the error message above). I also get that 
> error message it I try and restart it from webmin. I have searched about 
> a bit and found quite a few suggestions that the location of the 
> LoadModule line makes a large difference. I have moved it all over the 
> httpd.conf file and to no avail.
>
> Anybody got any ideas?
>
> TIA
> Graham
>
> PS I am using Apache 1.3, Tomcat 4.1.24 and mod_jk 1.2.2 rpm version
>
> -----------------------------------------------
> httpd.conf
> -----------------------------------------------
>
>
> <IfDefine HAVE_JK>
> LoadModule jk_module modules/mod_jk.so
> #AddModule  mod_jk.c
> Include /etc/httpd/conf/mod_jk.conf
> </IfDefine>
>
> <VirtualHost www.xfly.co.uk>
> DocumentRoot "/usr/local/tomcat/webapps/xfly/"
> ServerName xfly
>
> #tomcat connector config
> Alias / "/usr/local/tomcat/webapps/xfly/"
> <Directory "/usr/local/tomcat/webapps/xfly/">
> Options Indexes FollowSymlinks
> </Directory>
>
> JkMount /* ajp13
>
> <Location "/xfly/WEB-INF">
> AllowOverride None
> deny from all
> </Location>
> #tomcat connector config - end
> </VirtualHost>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

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