httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] DirectoryMatch - how to use the matched substring ?
Date Thu, 20 Jan 2005 01:03:40 GMT
On Wed, 19 Jan 2005 17:49:36 -0200,
<> wrote:
> Hi.
>        I am trying to implement a Webdisk-like service to the University where I work
> using Apache + mod_dav + mod_auth_ldap. The basic part is all set, with the
> authentication working and the DAV part too.
>        The problem I am facing now is as follows:
>        The regular expressions are not expanded (using $1, ...) when using
> DirectoryMatch. As a way (the only one that I can see) to avoid using .htaccess
> files, I would need to use regex expansion to make the Directory information in
> httpd.conf generic/dynamic.
>        The basic path can be seen as: /home/user/.
>        The thing is, only the 'user' has permission to access his home, and there will
> be some thousands of them..
>        My idea is to use something like:
>        <DirectoryMatch /home/([^/].*)/>
>        ...
>        require user $1
>        </DirectoryMatch>

No, you can't do that.

In 1.3 there is "require file-owner", but it has never been ported to
2.0 as far as I know, and I doubt it would work with ldap anyway.

One option is you could use mod_rewrite to automatically place people
in their home directories when they login.  Something like:

<Directory /home>
Require valid-user
RewriteEngine On
RewriteRule %{LA-U:REMOTE_USER} (.+)
RerwiteRule ^/webdisk /home/%1


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message