Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 20354 invoked by uid 6000); 26 Feb 1998 09:22:48 -0000 Received: (qmail 20343 invoked from network); 26 Feb 1998 09:22:46 -0000 Received: from twinlark.arctic.org (204.62.130.91) by taz.hyperreal.org with SMTP; 26 Feb 1998 09:22:46 -0000 Received: (qmail 14672 invoked by uid 500); 26 Feb 1998 09:22:45 -0000 Date: Thu, 26 Feb 1998 01:22:45 -0800 (PST) From: Dean Gaudet To: Apache Developer ML Subject: Re: Interesting problem: virtual host config In-Reply-To: <199802260910.KAA16821@en1.engelschall.com> Message-ID: X-Comment: Visit http://www.arctic.org/~dgaudet/legal for information regarding copyright and disclaimer. MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org I just sent this to the bugdb: Yeah one way to hack around this is to put: server_rec *created_in; into your server config. Then during your create_server_config routine initialize it to the server you're created in. Then later on during run time you can compare r->server to your_config->created_in and if they're different you can assume whatever defaults you want to. It's an ugly part of the API. Dean On Thu, 26 Feb 1998, Ralf S. Engelschall wrote: > > In PR#1790 we have been reported that mod_rewrite RewriteRules in > sections inherit the RewriteRules from the main server _only_ > under a very special situation: WHEN NO DIRECTIVES OF mod_rewrite OCCUR IN > THIS section. If at least a `RewriteEngine off' is there all > works correctly. > > The interesting problem which we have to solve is the following: If there is > at least one directive of a module, the per-server config-merging function is > used and thus can merge correctly. Mod_rewrite here does its job correct > because it initialized the per-server config with "engine disabled" and merges > this correctly. But now when no mod_rewrite directive exists in such a > section, it seems like mod_rewrite is never called (which in > general is fine). But then mod_rewrite cannot create a special per-server > config for this particular virtual host (where the engine would be disabled > per default) and thus the config of the main server is applied to this virtual > host. > > Hmmmm.... I currently don't know any solution for this. > > I just need either some way to force mod_rewrite to create a default > per-server config even for virtual hosts where actually none of its directives > exist or alternatively a way to check under runtime that the rewriting engine > is operating for a request to such a virtual server so it can decline > immediately. > > Any ideas on how to solve this problem? > > Ralf S. Engelschall > rse@engelschall.com > www.engelschall.com >