tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier (tomcat) ...@ice-sa.com>
Subject Re: Tomcat 8, AJP 1.3 UTF-8/ISO-8859-1 conversion problem
Date Tue, 18 Oct 2016 14:10:40 GMT
On 18.10.2016 15:22, Mark Juszczec wrote:
> On Tue, Oct 18, 2016 at 9:13 AM, Mark Juszczec <mark.juszczec@gmail.com>
> wrote:
>
>>
>>
>>    <VirtualHost *:9001>
>>      DocumentRoot /some/dir/thatDoesNotExist/
>>      JkEnvVar nameWithIntlChar
>>      JkMount /myService/* lbAjpWorker
>>      JkMount /myService lbAjpWorker
>>
>>    </VirtualHost>
>>
>>
> I forgot to ask something.
>
> The above DocumentRoot does not exist.  There is another DocumentRoot
> defined outside of the <VirtualHost *:9001> if posted but it does not exist
> either.
>
> Could this have anything to do with my problem?
>
> What should these values be set to?
>

This being a list dedicated to Tomcat, maybe we are going a bit deep in the Apache httpd 
configuration and precedence rules here.
It is anyway difficult to answer your questions, without seeing the whole of the Apache 
httpd configuration files.
Generally speaking :
- whatever configuration directive is outside a <VirtualHost> section, acts as a 
"default", which is inherited by all <VirtualHost> sections.
- if a <VirtualHost> section contains a similar directive to one of these default values,

then for requests to this <VirtualHost>, the directive that is inside the <VirtualHost>

section overrides the one that is outside.

But there are some total or partial exceptions to the above rules, some of which apply to

mod_jk (see for example JkMountCopy).

About the VirtualHost section which you list above : it looks strange to me, because :
- it would apply only to HTTP requests directed to port 9001, which is a bit unusual
- it does not seem to have a ServerName, which for name-based VirtualHosts is quite essential
- and without a valid DocumentRoot, any request for something other than the "JkMounted" 
URIs "/myService*" would have nowhere to be served from, and would thus return a "Not Found"

But again, without seeing the whole of the Apache httpd configuration, and without knowing

exactly how browsers access this server, it is difficult to make a final call.
On wich platform (OS) is this running ?

Separate note : if you are more familiar or at ease with Apache httpd configuration 
sections than with the JkMount/JkUnmount directives, you may want to have a look at an 
alternative way of configuring the httpd -> Tomcat forwarding.
See this page : http://tomcat.apache.org/connectors-doc/reference/apache.html
and scroll down to the section :
Using SetHandler and Environment Variables

This method *replaces* the usage of JkMount/JkUnmount directives, by directives enclosed 
in Apache httpd <Location> sections.  Personally, I find that (for someone familiar
with 
Apache httpd) this configuration method is clearer than JkMount/JkUnmount, because with 
JkMount/JkUnmount, it is sometimes unclear what the precedence rules are with respect to 
Alias, rewrite, proxy etc..

With respect to your (later) question about JkOptions : the same above page, in the 
initial "Configuration Directives" section, clearly specifies where each "Jk*" directive 
can be used and to what scope it applies. (The "global" term means : in the part of the 
configuration which is /not/ inside a <VirtualHost> section).



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


Mime
View raw message