httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marten Lehmann <>
Subject Re: mass-hosting and DOCUMENT_ROOT
Date Tue, 30 Apr 2002 14:34:43 GMT

>>My idea is to write my own apache-module, that does the host to path 
>>translation and additionally set the DOCUMENT_ROOT variable. But before 
>>I start, I would like to know (because you possibly have more knowledge 
>>about the internal apache-design than me), if it is possible to set this 
>>environment-variable in this phase so it takes effect in the later 
>>content-processing. I tried to set the variable inside my 
>>mod_perl-handler, but when the script I called through http was 
>>executed, the standard-document-root appeared again.
> This won't work because your setting will be overriden by the server's
> core module. You have to either (1) tell your users not to use the
> DOCUMENT_ROOT variable because it's a non-standard extension whose
> value is often wrong; (2) do a quick-and-dirty hack to the core for
> your installation; (3) fix it properly so that environment handling is
> federated rather than under the core's control.

so what would be the prefered way for mass-hosting? I mean: All 
virtualhost shall have the same properties, the log for all domains is a 
  perl-script which saves the log-entry with the appropriate hostname, 
which later is splitted. To recode big parts of apache is senseless, 
since apache will be improved and my changes maybe wouldn't fit in 
future releases. Besides the documentroot-problem: What is the best 
(meaning most performant) way to configure apache with several hunderts 
of domains and subdomains without having to reload apache with every change?

Marten Lehmann

View raw message