Hi Graham,
Try enabling server-info in the Apache config and confirming that
mod_jk has actually been loaded.
Your "LoadModule" is wrapped in an "Ifdefined" statement, so it's possible
that some of the mechanisms you are using to start apache do not define
"HAVE_JK", and mod_jk module does not get loaded. In your current
configuration, the webserver would need to be started with a command like:
httpd -D HAVE_JK
before your jk module will be loaded.
(you might want to check what exact commands are being used in the system
startup scripts and/or the apachectl script to confirm this)
However, your JkMount statement is not wrapped in any conditional statements,
so it will always attempt to execute this, even if mod_jk is not present
(hence the error).
The simplest solution for you is to probably remove the "IfDefined" wrapper
around your LoadModule/AddModule statements, so mod_jk will always be loaded.
Regards,
Morgan
> -----Original Message-----
> From: Graham Smith [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 02, 2003 15:05
> To: [EMAIL PROTECTED]
> Subject: Invalid command 'JkMount'....
>
>
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]