httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eduar...@cpd.ufrgs.br
Subject [users@httpd] DirectoryMatch - how to use the matched substring ?
Date Wed, 19 Jan 2005 19:49:36 GMT
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>

	But, $1 does not expand to the matched part of the regex (user). I tried to
search the archives, google, etc, but found nothing. Any ideas ?

	It does not seem feasible to use 1000 Directory entries, with its specific
"require user xxx" inside the httpd.conf file, and reload Apache each time a
user is added or removed. In that case, .htaccess seems better..
	If anyone has another solution (some magic module, maybe ?), I would like to
know.

Thanks in advance.

--eduardoh

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message