You are here: Foswiki>Tasks Web>Item2550 (02 Jan 2010, PaulHarvey)Edit Attach

Item2550: ApacheConfigGenerator prevents apache from serving internal /error documents

pencil
Priority: Urgent
Current State: New
Released In:
Target Release: n/a
Applies To: Web Site
Component: ApacheConfigGenerator
Branches:
Reported By: PaulHarvey
Waiting For:
Last Change By: PaulHarvey
ShortURLs are a fairly commonly used feature of the generator.

But it has a major flaw: when ShortURLs at the root of the domain, such as foswiki.org are configured, Apache is unable to access its internal /error documents, Eg.:

Error 408 Request Timeout tries to load (on one of my servers): /error/HTTP_REQUEST_TIME_OUT.html.var

But actually, because we Alias / "/path/to/foswiki/bin/view/", it ends up at "/path/to/foswiki/bin/view/error/HTTP_REQUEST_TIME_OUT.html.var" (or apache barfs with "unable to show error document")

It actually lives at /usr/share/apache2/error/HTTP_REQUEST_TIME_OUT.html.var on the filesystem.

Further, if I have Aliases configured for other things in this domain, eg. /awstats, strange things happen with the 401 auth message which I sadly cannot recall atm but will do more digging if required.

The fix is to place an
Alias /error "/path/to/apache2/error"
right above the
Alias / "/path/to/foswiki/bin/view/"
however for the ApacheConfigGenerator, unless we want to ask the user where their apache error documents live, we should just use something like (untested):
RewriteRule !^\/error\/ /path/to/foswiki/bin/view/ [NE]
instead of an Alias

See also: Item2549

-- PaulHarvey - 02 Jan 2010

ItemTemplate edit

Summary ApacheConfigGenerator prevents apache from serving internal /error documents
ReportedBy PaulHarvey
Codebase
SVN Range
AppliesTo Web Site
Component ApacheConfigGenerator
Priority Urgent
CurrentState New
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn
Topic revision: r1 - 02 Jan 2010, PaulHarvey
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy