All you need to do is put your JkMounts in their appropriate
VirtualHosts and either include the LoadModule, AddModule, 
JkWorkersFile, JkLogFile, JkLogLevel (not sure if those are 
exactly right) outside the virtual hosts and before the JkMounts 
or just do everything inline in httpd.conf.

Something like this but don't quote me on the exact syntax and 
directive names:

LoadModule jk_module          libexec/mod_jk.so
AddModule mod_jk.c

JkWorkersFile /path/to/workers.properties
JkLogFile /path/to/mod_jk.log
JkLogLevel error

<VirtualHost 127.0.0.1>
        ...
        JkMount /custom_name1 ajp12_custom
        JkMount /caffeine ajp12_custom
        ....
</VirtualHost>

<VirtualHost 127.0.0.2>
        ...
        JkMount /custom_name2 ajp13_custom
        JkMount /caffeine ajp13_custom
        ...
</VirtualHost>

That sounds about like what you're trying to accomplish.  Obviously, 
I've left some stuff out, but you should be able to fill in the blanks.

Best Regards,

Jason Koeninger
J&J Computer Consulting
http://www.jjcc.com

On Tue, 28 Aug 2001 17:36:07 +0800, Stuart Clement wrote:

>Hi All,
>
>I have the following scenario.....
>
>Suse Linux 7.0
>JDK 1.3.0
>Apache 1.3.19
>Tomcat 3.2.1
>
>I am using mod_jk and I have a workers.properties-custom file that creates two
>more workers (ajp12_custom, ajp13_custom) on new ports (8011 & 8013
>respectively). They are added to the worker.list and load balance list. This
>file is referenced in my custom mod_jk configuration file (mod_jk.conf-custom)
>as the correct worker file.
>
>I also have two custom server.xml files which are used to startup and shutdown
>using the -f flag to the startup.sh and shutdown.sh scripts. Each server.xml
>file has two (2) application specific contexts, one of which is identical in
>name only, between both files:
>
>server.xml:
>-----------
>
>/custom_name1
>/caffeine
>
>
>server_custom.xml:
>--------------------
>
>/custom_name2
>/caffeine
>
>The /caffeine context, whilst the same in name, needs to point to different
>locations for each webapp. They cannot be shared.
>
>Everything works correctly, apart from when the /caffeine context is accessed
>in each webapp. I realised that I have a common mod_jk.conf-custom file that
>of course only has the one /caffeine configuration block. In my haste I set
>the connector for /caffeine context to be the new ajp13_custom, which only
>works for one webapp and not the other.
>
>So, the question is really... I'm not sure how to best do this?  I've tried
>declaring two (2) mod_jk.conf files:
>
>mod_jk.conf-caffeine
>mod_jk.conf-custom
>
>and set an Include statement for each virtual host declaration in my Apache
>httpd.conf, instead of a global Include as I had previously, however I get the
>following error when trying to start Apache:
>
>Syntx error on line 8 of /usr/local/tomcat/conf/mod_jk.con-caffeine
>LoadModule connot occur within <VirtualHost> section
>./apachectl start: httpd could not be started
>
>This is the line that loads the mod_jk module  /libexec/mod_jk.so
>
>Does anyone have any suggestions?
>
>thanks in advance
>
>Stu
>
>
>


Reply via email to