From nobody@hyperreal.com Wed Apr 9 05:51:44 1997 Received: (from nobody@localhost) by hyperreal.com (8.8.4/8.8.4) id FAA25862; Wed, 9 Apr 1997 05:51:44 -0700 (PDT) Message-Id: <199704091251.FAA25862@hyperreal.com> Date: Wed, 9 Apr 1997 05:51:44 -0700 (PDT) From: Sebastian Andersson Reply-To: sa@hogia.net To: apbugs@hyperreal.com Subject: ErrorDocument /file problem with virtual domains. X-Send-Pr-Version: 3.2 >Number: 346 >Category: config >Synopsis: ErrorDocument /file problem with virtual domains. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Wed Apr 9 18:20:15 1997 >Last-Modified: Sun Jun 29 17:13:47 PDT 1997 >Originator: sa@hogia.net >Organization: >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: State-Changed-From-To: open-feedback State-Changed-By: dgaudet State-Changed-When: Sat Apr 19 16:02:41 PDT 1997 State-Changed-Why: If you use a relative link in the ErrorDocument then there's not much else the server can do except serve it from the request's VirtualHost. However you can use the Alias directive to Alias /error_htmls /path/to/real/docroot/error_htmls. Does that do what you want? Dean State-Changed-From-To: feedback-closed State-Changed-By: dgaudet State-Changed-When: Sun Jun 29 17:13:47 PDT 1997 State-Changed-Why: Alias should fix the problem. No response from user, closing it out. Dean >Unformatted: