httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <B.Cand...@pobox.com>
Subject ServerRoot in server rec?
Date Sun, 11 Sep 2005 14:40:50 GMT
I wondered if any consideration had been given to making ServerRoot an
option which could be overridden per virtual-server (e.g. as a member of
struct server_rec)?

The particular issue I have is with mass virtual hosting and directives like
AuthUserFile in .htaccess files. If you have

    ServerRoot /web/sites

but a hashed directory structure for individual virtual hosts, e.g.

    <VirtualHost ...>
    ServerName www.example.com
    DocumentRoot /web/sites/1/6b/3f92/html
    </VirtualHost>

then all the .htaccess files for this site must know about (and hard-code)
the hashed directory path, e.g.

    AuthUserFile 1/6b/3f92/security/users
or
    AuthUserFile /web/sites/1/6b/3f92/security/users

(At least, this is the case with Apache 1.3, but I've had a quick look at
the source code for 2.1.7-beta and as far as I can tell it's the same)

So, it's difficult to build a site in such a way that it's robust against
migrations between one server and another, where it may sit in a different
hashed location. But:

    <VirtualHost ...>
    ServerName www.example.com
    ServerRoot /web/sites/1/6b/3f92
    DocumentRoot /web/sites/1/6b/3f92/html
    </VirtualHost>

would allow

    AuthUserFile security/users

Has this feature already been considered and rejected (and if so, why)?

Thanks,

Brian.

Mime
View raw message