On 9/18/2012 11:46 AM, John Rellis wrote:
On Tue, Sep 18, 2012 at 3:56 PM, André Warnier<a...@ice-sa.com>  wrote:

John Rellis wrote:

André,

Thanks!  OK, so I put

         JkMount /jkmanager/ jkstatus
         JkMount /jkmanager/* jkstatus

Into apache2.conf and no success.  I did however put it
in sites-available/default

<VirtualHost *:80>
         ServerAdmin webmaster@localhost

         JkMount /jkmanager/ jkstatus
         JkMount /jkmanager/* jkstatus
.....

And I can now hit host/jkmanager/ and I get a UI.

Is this the expected behaviour???

  Yes, but do not top-post.  Read http://en.wikipedia.org/wiki/**
Posting_style#Choosing_the_**proper_posting_style<http://en.wikipedia.org/wiki/Posting_style#Choosing_the_proper_posting_style>

In reality there are several factors at work here.  We are getting into
Apache VirtualHost logic, and the logic of inheritance of JkMount from the
main Apache configuration to the virtual hosts.
To get a fuller explanation, see the online documentation and the
"JkMountCopy" directive.

Briefly :
- for Apache httpd :
    - generally, whatever "lives" outside a<VirtualHost>  section belongs
to the "main" configuration, and basically acts as a default value for any
VirtualHost, /unless/ it is superseded by a similar directive inside a
<VirtualHost>  section.
- for JkMount however : by default, a JkMount in the main httpd
configuration is /not/ inherited by the VirtualHost sections, /unless/ you
use the JkMountCopy instruction appropriately.

In addition, there is the logic determining which VirtualHost
configuration is really handling your request.
The first defined VirtualHost in the Apache httpd configuration (from top
to bottom) acts as the "default" VirtualHost.  That means that for any
request where httpd cannot determine to which VirtualHost it is addressed
(because the hostname of the request does not match any "ServerName" of a
VirtualHost), Apache httpd will use this default virtual host configuration
to process the request.

In your case, if you send a request to "http://(ip address)/x", and none
of your VirtualHost sections contains a "serverName (ip address)" matching
exactly, then the request will be processed with the configuration of the
default VirtualHost.
Which is what is happening here.

And the combination of all the above is why, when you put the JkMounts in
the default VirtualHost configuration section, it "works".

But it is not really supposed to work that way. Your http request should
be properly addressed to a specific VirtualHost - by name - and this
VirtualHost configuration should be so that it contains the appropriate
JkMount directives (or a JkMountCopy directive, to inherit the JkMounts
from the main configuration).

And I hope that you are not totally lost ater that. ;-)



------------------------------**------------------------------**---------
To unsubscribe, e-mail: 
users-unsubscribe@tomcat.**apache.org<users-unsubscr...@tomcat.apache.org>
For additional commands, e-mail: users-h...@tomcat.apache.org




André,

Thanks very much for your help.

I put :

<VirtualHost *:80>
         ServerAdmin webmaster@localhost
         JkMount /ClusterApp/ LoadBalancer
         JkMount /ClusterApp/* LoadBalancer
         JkMount /jkmanager/ jkstatus
         JkMount /jkmanager/* jkstatus

And it is now hitting my cluster after two days of agony soooo
  YEEEEEEEEEEESSSSSSSSS!!!!

Phew!  Your explanation is great, and with it, i put JkMountCopy in the
virtual host and the url mappings in apache2.conf and it works!  :)  Beer!

Thanks again.  Regarding top posting, apologies, I am using gmail and I
never noticed it was an issue on other lists but I of course respect the
decision of each individual list! :)

I'm not sure how to bottom post in gmail so I just put my reply after
yours, hope its ok!

That's exactly what bottom-posting is, so you did it just right.






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to