* Jem Berkes wrote:
>> The documentation configuration was changed in 2.0.47. Just c&p the
>> docs configuration block from the default httpd.conf.
>
> Thanks! That's done the trick.
>
> Now I'm wondering what this does:
> DirectoryIndex index.html.var
>
> I thought that apache would server the appropriate language if
> index.html.LANG-CODE existed, I guess there's more to the setup than this
> if one wishes to serve such a multilingual index?
Depends :)
DirectoryIndex index.html.var (defined document root for the "successfully
installed" default page) lets apache look for such a file if one requests a
directory (
http://example.com/). .var refers to a type-map (there's a
AddHandler type-map .var somewhere else), which contains the descriptions of
the different variants. mod_negotiation picks up that type-map handler and
delivers the variant of choice then.
However, one doesn't *need* to use explicit type-maps. Apache can create
(limited) ones on the fly. That is what Options +MultiViews is for. If this
option is set, mod_negotiation jumps in if the requested file was *not*
found. For example, someone requests foo.html but there are only files like
foo.html.en
foo.html.fr or even
foo.html.ja.jis
It now creates such a type-map on the fly and selects the appropriate variant.
In order to know, that foo.html.en stands for English, you have to configure
that. This is done using AddLanguage directives, e.g.
AddLanguage en .en
AddLanguage fr .fr
AddLanguage ja .ja
The latter has also the extension .jis, which is also defined somewhere:
AddCharset iso-2022-jp .jis
which means then, this file will be delivered if the browser accepts (a)
language ja and (b) the iso-2022-jp charset.
There are, however, more negotiation dimenensions than language or charset.
This was only a short abstract of that what the httpd-docs explain. Just have
a look into negotiation docs, like:
<http://httpd.apache.org/docs-2.0/content-negotiation.html>
-----
The docs trick a bit, since they do define type-map files, but don't name them
..var but .html (just look into such a file :). Additionally they make use of
a new mod_negotiation feature, which allows for selecting a language per
request, independent from the browser's Accept-Header.
HTH, nd