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

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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to