httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Schulze ...@bytecamp.net>
Subject Re: what should be done in a vhost_db module?
Date Tue, 08 Apr 2008 08:52:07 GMT
Tom Donovan schrieb:

 >
> In a threaded mpm, the same r->server struct is used by multiple 
> requests simultaneously.  It isn't safe to change anything in it on the 
> fly.

OK, thats a pity.

I now tried to set several other variables ("Host" in r->headers_in, 
r->hostname, etc.) but all those settings did not set the hostname of 
the virtualhost. You can see that by inspecting /server-status/ and have 
a look at accesslogs. There will always be the main servername used 
instead of anything crafted from the module.

In this way, this stuff is useless :-(
Does anybody know, how to set the hostname for the virtualhost 
correctly, so that other modules might gather the correct info from the 
request?


One more bad thing is, that one can't set the DocumentRoot without (once 
again) playing with the core configuration. Simply setting

	apr_table_set(r->subprocess_env, "DOCUMENT_ROOT","/foo/var");

is not enough, since that value will magically become overwritten by 
later work from apache :-(


BTW: I looked at mod_vhost_alias, mod_vhost_dbi, mod_vhost_ldap, 
mod_vhost-modules to get knowledge about how to write a module and so 
on, so please point me to them :-)

with kind regards,
Robert Schulze

Mime
View raw message