Thanks for the response, I didn't know JkMount directives could be placed
within VirtualHost declarations.  Our httpd.conf uses the following:

<IfModule mod_jk.c>
    JkWorkersFile    /usr/local/tomcat/conf/workers.properties
    JkLogFile    logs/jk.log
    JkLogLevel    error
    JkMount        /*.jsp        ajp13
    JkMount        /servlet/*    ajp13
</IfModule>

This is located beneath all our VirtualHost declarations, I presume it must
be declared before the virtualhost stuff, in order for the JkMount directive
to be recognized, correct?

And won't all the VirtualHost decls have to be within the <IfModule ...>
tags?

Thanks


On Tue, Dec 2, 2008 at 11:45 AM, André Warnier <[EMAIL PROTECTED]> wrote:

> Jonathan Mast wrote:
>
>> I'm using Apache+Tomcat (1.3.33, 5.5.17) and I have servlet named "bar",
>> with no file extension in its name.
>>
>> bar is in a folder named "foo" which is reachable by 2 virtual hosts:
>> www.mysite.com/foo/bar
>> foo.mysite.com/bar
>>
>> I know to how tell apache that request for  /bar on the WWW virtual host
>> should be handled by Tomcat:
>> JkMount        /foo/*    ajp13
>>
>> Simple enough, but can I also specify foo.mysite.com as well, like this?
>> JkMount       foo.mysite.com/* ajp13
>>
>>  (Note that above, you are not just re-directing "bar" to Tomcat, you are
> redirecting much more)
>
>
> I'm guessing a number of things here, but you seem to talk about
> VirtualHosts in Apache, apparently something like this :
>
> <VirtualHost *:80>
>  ServerName www.mysite.com
>  ...
> </VirtualHost>
>
> <VirtualHost *:80>
>  ServerName foo.mysite.com
>  ...
> </VirtualHost>
>
> So why not then
>
> <VirtualHost *:80>
>  ServerName www.mysite.com
>  JkMount /foo/bar ajp13
>  JkMount /foo/bar* ajp13
> </VirtualHost>
>
> <VirtualHost *:80>
>  ServerName foo.mysite.com
>  JkMount /bar ajp13
>  JkMount /bar* ajp13
> </VirtualHost>
>
> If it makes it easier, and at least in Apache 2.x, you can also use
> sections like
>
> <Location /foo/bar>
>  SetHandler jakarta-servlet
>  ...
> </Location>
>
> as a kind of alias for your JkMount directives.
> This is a bit harder to find in the documentation, but it appears here :
> http://tomcat.apache.org/connectors-doc/reference/apache.html
> Using SetHandler and Environment Variables
> (at the very end)
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to