Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 25999 - apache-2.0.47 manual
Summary: apache-2.0.47 manual
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Donny Davies (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-05 16:53 UTC by jake buchholz
Modified: 2003-09-24 20:26 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jake buchholz 2003-08-05 16:53:54 UTC
after installing or upgrading to apache 2.0.47, the online manual no longer is
served properly via http.  the problem appears to be related to changes in how
the default language stuff works in the new version.  you can reach the main
page via /manual/index.html.en, but you always have to add .en to each
subsequent manual page url.

i asked about this on the apache development list, and got the following response:

-----(snip)-----
From: Joshua Silve <joshua@slive.ca>

On Tue, 29 Jul 2003, jake buchholz wrote:
>> one of the things that's struck me as odd is that by going to
>> http://localhost/manual, it's responding with...
>>
>> URI: index.html.de Content-Language: de Content-type: text/html;
[etc.]
>> ...instead of realizing that my default language is 'en' and showing me
>> /manual/index.html.en

Yes, you need to have something like the configuration attached below
(which is part of the default config in 2.0.47).  I guess is was a mistake
to make this drastic a change to the manual in midstream, but it is done,
so we need to live with it.

AliasMatch ^/manual(?:/(?:de|en|fr|ja|ko|ru))?(/.*)?$ "@exp_manualdir@$1"

<Directory "@exp_manualdir@">
    Options Indexes
    AllowOverride None
    Order allow,deny
    Allow from all

    <Files *.html>
        SetHandler type-map
    </Files>

    SetEnvIf Request_URI ^/manual/de/ prefer-language=de
    SetEnvIf Request_URI ^/manual/en/ prefer-language=en
    SetEnvIf Request_URI ^/manual/fr/ prefer-language=fr
    SetEnvIf Request_URI ^/manual/ja/ prefer-language=ja
    SetEnvIf Request_URI ^/manual/ko/ prefer-language=ko
    SetEnvIf Request_URI ^/manual/ru/ prefer-language=ru
    RedirectMatch 301 ^/manual(?:/(de|en|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$2
</Directory>
-----(snip)-----

FWIW, I have not yet had the chance to apply the above to verify if it fixes the
problem...
Comment 1 Donny Davies (RETIRED) gentoo-dev 2003-08-05 21:18:46 UTC
ok, if you verify it, then i can at least plan to merge this change
into the gentoo apache config file.

thanks.
Comment 2 Michael Lenz 2003-08-07 01:39:46 UTC
Had the same problem.  I fixed this by renaming *.html files to *.html.var since 
they are content-negotiated.  This is how the html document root test page is 
setup.  Using the default configuration, apache2 doesn't understand how to look at 
*.html file for this info, just *.var files. 
commonapache.conf defines this with: 
# AddHandler type-map var 
Renaming all thost files is a pain without a script, but I just ran this on the 
problem directories (/manual, /manual/mod, etc....)  
#rename .html .html.var *.html 
Comment 3 Donny Davies (RETIRED) gentoo-dev 2003-08-28 21:46:46 UTC
i suppose i might just rename the manual files in the src_install.

the config snippet suggested seems tailored to the manual anyways, so...

sound ok?
Comment 4 Robin Smidsrød 2003-08-28 23:12:19 UTC
Use this little code snippet to change all the files ending in JUST .html to .html.var.

It's cruel and dirty, but it works since they don't use spaces in the filenames. :)

cd /home/httpd/htdocs/manual
for name in `find . | grep '.html$'`; do echo "$name" "$name.var" ; done
Comment 5 Donny Davies (RETIRED) gentoo-dev 2003-09-04 09:33:49 UTC
actually im going to add the config snippet, probably today or tomorrow look for the new release.

thanks a bunch jake.

Comment 6 Donny Davies (RETIRED) gentoo-dev 2003-09-24 20:26:11 UTC
config snip added in 2.0.47-r1