You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Sebastian Andersson <sa...@hogia.net> on 1997/04/10 03:20:16 UTC
config/346: ErrorDocument /file problem with virtual domains.
>Number: 346
>Category: config
>Synopsis: ErrorDocument /file problem with virtual domains.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apache (Apache HTTP Project)
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Wed Apr 9 18:20:15 1997
>Originator: sa@hogia.net
>Organization:
apache
>Release: 1.1.3
>Environment:
Linux 2.0.28, gcc 2.7.2
>Description:
Defining an ErrorDocument /file.html in the http.conf file makes the virtual hosts
try to find virtual.domain.mil/file.html whenever it should display that error
document instead of real.domain.mil/file.html. Defining with a complete URL works
fine but then the error codes are wrong making search engines whine (or their
maintainer).
>How-To-Repeat:
I can't set up a "permanent" server like this but I can set up one upon request.
http.conf:
ErrorDocument 403 /error_htmls/accessdenied.html
ErrorDocument 404 /error_htmls/notfound.html
and then a virtual domain added to this and access http://virtual.domain.com/notfoundfile
will try to let you visit http://virtual.domain.com/error_htmls/notfound.html.
>Fix:
Maybe change r->server to the real server in die() in http_request.c before it
calls internal_redirect() but that would probably break custom ErrorDocuments
defined in .htaccess files. Otherwice one could add the server in the
conf->response_code_strings so the right server always is known.
A better way might be to add a new method for errordocuments to be specified
so you can specify an absolute filepath.
%0
>Audit-Trail:
>Unformatted: