NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use trunk.foswiki.org to view this page for some minimal testing.
Use Item11383 for general documentation changes for release 1.1.5. Use Item9693 for docu changes for release 2.0.

Item2550: ApacheConfigGenerator prevents apache from serving internal /error documents

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Urgent New Web Site ApacheConfigGenerator  
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 - 14:35:29 - PaulHarvey
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads