From: Randy Terbush <randy@zyzzyva.com>
I was just beginning to hack on multi-homed support.
The changes are fairly minor and I wanted to ask the group
what their thoughts are about implementation.
The direction I would like to take would be to reset
'DocumentRoot' based on the answering IP address
(ie the IP that the server is answering for). I see
it being much like 'ScriptAlias' such that if the
IP contacted is 200.100.50.1, DocumentRoot gets
set to /www/docs/200.100.50.1.
Comments?
Hmmm... there are a lot of multi-homed support patches out there, and
I haven't looked at any of 'em, so take this with a grain of salt:
My own personal preference would be to add some sort of conditional
Alias, rather than zorching DocumentRoot. This may be a matter of
taste though; the only concrete reason I can think of for the
preference has to do with going to a persistent-child-process model,
in which you'd have to be fairly careful to set DocumentRoot *back*,
even in the face of unanticipated errors, or Bad Things Might Happen.
(Conditional aliases would require some mods to the alias data
structures in http_access.c, to hold the conditions, but you wouldn't
have to modify anything on the fly).
The other implementation I have seen sets a CGI environment
variable to SERVER_ROOT which requires an index.cgi to
be in the toplevel document directory. Seems like all of those
execs could add up to a lot of overhead.
This does seem a bit extreme...
rst
|