You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Scott Musser <sc...@leba.net> on 1997/03/15 20:50:01 UTC

config/233: ErrorDocument behaves strangely

>Number:         233
>Category:       config
>Synopsis:       ErrorDocument behaves strangely
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apache (Apache HTTP Project)
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Sat Mar 15 11:50:01 1997
>Originator:     scott@leba.net
>Organization:
apache
>Release:        1.2b7
>Environment:
BSDI 2.1, all patches installed.
>Description:
After upgrading from 1.01 to 1.2b7, the ErrorDocument directive within virtual
hosts broke. The ErrorDocument file name specified within the first
<VirtualHost> is applied to all virtual hosts and to the main server.
Additional ErrorDocument directives in both httpd.conf and in
srm.conf are ignored. Reverting to 1.01 eliminated the problem.

Everything looks ok if the main server and virtual hosts use the same file
names within the ErrorDocument 404 (the only # I tested) directive. If the
file names are different, the first one specified in a <VirtualHost> wins,
and the other virtual host displays "File Not Found - The requested URL
/whatever.htm was not found on this server. - Additionally, an error of
type 404 was encountered while trying to use an ErrorDocument to handle the
request."

This may not be related, but the error log file has double slashes between
the host part and the file part of the urls: 
[Sat Mar 15 14:14:34 1997] access to /usr/u1/paacep/www//whatever.htm failed for moose.leba.net, reason: File does not exist
[Sat Mar 15 14:14:34 1997] access to /usr/u1/paacep/www//missing.html failed for moose.leba.net, reason: File does not exist

The missing.html file was specified in an earlier <VirtualHost>, not in the
one being accessed. The server shouldn't have tried to access it within the
context of that <VirtualHost>.

Here's the config for the virtual host being accessed:
<VirtualHost www.paacep.org>
UserDir n0n3
ServerAdmin balogh@leba.net
DocumentRoot /usr/u1/paacep/www/
ServerName www.paacep.org
ErrorLog /usr/u1/paacep/www/logs/error_log
TransferLog /usr/u1/paacep/www/logs/access_log
ErrorDocument 403 /accessdenied.htm
ErrorDocument 404 /error.htm
ErrorDocument 500 /badcgi.htm
</VirtualHost>

If I move this <VirtualHost> to the beginning of the list of virtual hosts,
then the paacep virtual host's ErrorDocuments are found, but all other hosts
that use (for example) missing.html for ErrorDocument 404 can't find it.

If I just have things configured wrong, this "bug" should be reclassified
as a documentation problem.
>How-To-Repeat:
Create virtual hosts with different file names specified in ErrorDocument
404 directives. The ErrorDocument 404 file name specified in the first
<VirtualHosts> takes precedence, later ErrorDocument 404 file names are
ignored.

http://www.leba.net/ is main server.
http://www.paacep.org/ is the virtual host described above.

Email me an IP address and I'll open up the /server-info page for you.
>Fix:
No.
%0
>Audit-Trail:
>Unformatted: